diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-09-08 16:05:54 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-09-08 16:05:54 +0200 |
| commit | 0a6a7fb9b49a2180a68f6c96815ebd9b7f6b5ab7 (patch) | |
| tree | 09d112663ca6e6b8255b58fec64522b2b6888c8d /animism-align/frontend/app/views/viewer/viewer.actions.js | |
| parent | 064e8652dc4fae7167e3cd34a6fbe6b36e6239d1 (diff) | |
section 2 carousel
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
| -rw-r--r-- | animism-align/frontend/app/views/viewer/viewer.actions.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index c1b11be..3b6fbdd 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -11,6 +11,7 @@ import { import { floatInRange } from 'app/utils' import { buildParagraphs } from 'app/utils/transcript.utils' import { annotationFadeTimings } from 'app/utils/annotation.utils' +import { getNextSection } from 'app/utils/viewer.utils' const newSection = (annotation, index, mediaIndex) => ({ start_ts: annotation.start_ts, @@ -176,14 +177,6 @@ export const toggleComponent = key => dispatch => { dispatch({ type: types.viewer.toggle_component, key, value: !store.getState().viewer[key] }) } -const getNextSection = section => { - const { sections } = store.getState().viewer - if (section.index === sections.length - 1) { - return null - } - return sections[section.index + 1] -} - export const reachedEndOfSection = () => dispatch => { actions.audio.pause() dispatch({ type: types.viewer.reached_end_of_section }) |
