From 0a6a7fb9b49a2180a68f6c96815ebd9b7f6b5ab7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 8 Sep 2020 16:05:54 +0200 Subject: section 2 carousel --- animism-align/frontend/app/views/viewer/viewer.actions.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js') 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 }) -- cgit v1.2.3-70-g09d2