summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/sections/viewer.sections.nav.js
blob: 439b905a34301c5c2bf231cb2a9998a0683b98b8 (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 { Link } from 'react-router-dom'
import { connect } from 'react-redux'

import actions from 'app/actions'
import { Arrow } from '../nav/viewer.icons'

class ViewerSectionsNav extends Component {
  render() {
    const { viewer } = this.props
    return (
      <div className="viewer-nav sections-nav">
        <div className='nav-row'>
          <div>
            <span className="share-link link">
              <Arrow type={'up'} />
              {'Share'}
            </span>
          </div>
          <div>
            <span className="checklist-link link" onClick={() => actions.viewer.toggleSection('checklist')}>
              <Arrow type={viewer.checklist ? 'down': 'up'} />
              {'Checklist'}
            </span>
          </div>
          <div>
            <span className="transcript-link link" onClick={() => {
              actions.viewer.hideSection('checklist')
              actions.viewer.toggleSection('transcript')
            }}>
              {'Transcript'}
            </span>
          </div>
        </div>
      </div>
    )
  }
}

const mapStateToProps = state => ({
  viewer: state.viewer,
})

export default connect(mapStateToProps)(ViewerSectionsNav)