summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/utils/viewer.utils.js
blob: b61f99884478d22f392b94335035095051d62c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { store } from 'app/store'

export const getSection = index => {
  const { sections } = store.getState().viewer
  return sections[index]
}

export const getNextSection = section => {
  const { sections } = store.getState().viewer
  if (section.index === sections.length - 1) {
    return null
  }
  return sections[section.index + 1]
}