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 }) }