summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/editor/paragraph/transcript.actions.js
blob: 336a79d6964ec6e08bca1c7d874cefbbc747600a (plain)
1
2
3
4
5
6
7
8
9
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 })
}