summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/sections/viewer.sections.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-07-23 22:53:38 +0200
committerJules Laplace <julescarbon@gmail.com>2020-07-23 22:53:38 +0200
commit0f6179706deb9c0a235013bddebc33596eaf08e3 (patch)
tree78032964844fd34658ec595cbf1515f49a4f3ab4 /animism-align/frontend/app/views/viewer/sections/viewer.sections.js
parent599d3e0758d6f1a3cf5ce69cfc03eab484c3ff17 (diff)
opening and closing the nav
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.js13
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]) + ')',