import React, { Component } from 'react' // import { Link } from 'react-router-dom' import { connect } from 'react-redux' import actions from 'app/actions' import ViewerSectionsNav from './viewer.sections.nav' import { ROMAN_NUMERALS } from 'app/constants' import { thumbnailURL } from 'app/utils/annotation.utils' class ViewerSections extends Component { componentDidMount() { } handleSectionSelection(section) { actions.audio.seek(section.start_ts) actions.viewer.hideSection('nav') } render() { const { sections } = this.props return (
{sections.map(section => { // console.log(section) return (
this.handleSectionSelection(section)} >
{ROMAN_NUMERALS[section.index]}
{section.title}
{section.mediaLabels}
) })}
) } } const mapStateToProps = state => ({ sections: state.viewer.sections, }) export default connect(mapStateToProps)(ViewerSections)