diff options
Diffstat (limited to 'animism-align/frontend/app/views/viewer/sections/viewer.sections.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/sections/viewer.sections.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/animism-align/frontend/app/views/viewer/sections/viewer.sections.js b/animism-align/frontend/app/views/viewer/sections/viewer.sections.js index c4681b8..268b6d9 100644 --- a/animism-align/frontend/app/views/viewer/sections/viewer.sections.js +++ b/animism-align/frontend/app/views/viewer/sections/viewer.sections.js @@ -11,14 +11,23 @@ class ViewerSections extends Component { componentDidMount() { } + handleSectionSelection(section) { + actions.audio.seek(section.start_ts) + actions.viewer.hideSection('sections') + } + render() { const { sections } = this.props return ( <div className="viewer-sections"> {sections.map(section => { - console.log(section) + // console.log(section) return ( - <div className="viewer-section" key={section.index}> + <div + className="viewer-section" + key={section.index} + onClick={() => this.handleSectionSelection(section)} + > <div> <div className="section-thumbnail" style={{ backgroundImage: section.media.length && 'url(' + thumbnailURL(section.media[0]) + ')', |
