blob: 56046c346062944d5d68ad40c87b5784347a0206 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
import React, { Component } from 'react'
// import { Link } from 'react-router-dom'
import { connect } from 'react-redux'
import actions from 'app/actions'
import { Arrow } from '../nav/viewer.icons'
import ViewerSectionsShare from './viewer.sections.share'
import ViewerSectionsSubscribe from './viewer.sections.subscribe'
class ViewerSectionsNav extends Component {
render() {
const { viewer } = this.props
return (
<div className="viewer-nav sections-nav">
<div className='nav-row'>
<div>
<div className="share-link link">
<ViewerSectionsShare />
<span onClick={() => actions.viewer.toggleComponent('share')}>
<Arrow type={'up'} />
{'Share'}
</span>
</div>
<div className="subscribe-link link">
<ViewerSectionsSubscribe />
<span onClick={() => actions.viewer.toggleComponent('subscribe')}>
<Arrow type={viewer.subscribe ? 'down' : 'up'} />
{'Subscribe'}
</span>
</div>
</div>
<div>
<div className="checklist-link link" onClick={() => actions.viewer.toggleComponent('checklist')}>
<Arrow type={viewer.checklist ? 'down': 'up'} />
{'Checklist'}
</div>
</div>
<div>
<div className="footnotes-link link">
<span onClick={() => actions.viewer.toggleComponent('footnotes')}>
<Arrow type={viewer.footnotes ? 'down' : 'up'} />
{'Footnotes'}
</span>
</div>
<div className="transcript-link link" onClick={() => actions.viewer.openTranscript()}>
{'Transcript'}
</div>
</div>
</div>
</div>
)
}
}
const mapStateToProps = state => ({
viewer: state.viewer,
})
export default connect(mapStateToProps)(ViewerSectionsNav)
|