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