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 (
actions.viewer.toggleComponent('nav')}> {viewer.currentSection && {ROMAN_NUMERALS[viewer.currentSection.index]} {'. '} {viewer.currentSection.title} }
{viewer.nextSection && actions.viewer.seekToSection(viewer.nextSection)}> Next }
) } } const mapStateToProps = state => ({ viewer: state.viewer, }) export default connect(mapStateToProps)(NavParent)