blob: 9cb4e93fa7c772ca7e8f4cfb81a3b0e6bc8f9c8b (
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
|
import React, { Component } from 'react'
import { connect } from 'react-redux'
import actions from 'app/actions'
import { ROMAN_NUMERALS } from 'app/constants'
import { Arrow } from './viewer.icons'
import NavPlayer from './nav.player'
class NavParent extends Component {
render() {
const { viewer } = this.props
return (
<div className={"viewer-nav " + viewer.navStyle}>
<div className='nav-row main-nav'>
<div className='nav-section-name'>
<span className="section-link link" onClick={() => actions.viewer.toggleComponent('nav')}>
<Arrow type={viewer.nav ? 'down' : 'up'} />
{viewer.currentSection &&
<span>
{ROMAN_NUMERALS[viewer.currentSection.index]}
{'. '}
{viewer.currentSection.title}
</span>
}
</span>
</div>
<NavPlayer />
<div className='nav-next'>
<span className="next-link link">
Next
<Arrow type={'right'} />
</span>
</div>
</div>
</div>
)
}
}
const mapStateToProps = state => ({
viewer: state.viewer,
})
export default connect(mapStateToProps)(NavParent)
|