summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/editor/paragraph/transcript.actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'animism-align/frontend/app/views/editor/paragraph/transcript.actions.js')
-rw-r--r--animism-align/frontend/app/views/editor/paragraph/transcript.actions.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/editor/paragraph/transcript.actions.js b/animism-align/frontend/app/views/editor/paragraph/transcript.actions.js
new file mode 100644
index 0000000..336a79d
--- /dev/null
+++ b/animism-align/frontend/app/views/editor/paragraph/transcript.actions.js
@@ -0,0 +1,10 @@
+import * as types from 'app/types'
+import { store, history, dispatch } from 'app/store'
+import { buildParagraphs } from 'app/utils/transcript.utils'
+
+export const buildAllParagraphs = () => dispatch => {
+ const state = store.getState()
+ const annotationOrder = state.annotation.index.order
+ const { paragraphs, footnotes } = buildParagraphs(annotationOrder)
+ dispatch({ type: types.paragraph.update_transcript, paragraphs, footnotes })
+}