diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-09-08 16:05:54 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-09-08 16:05:54 +0200 |
| commit | 0a6a7fb9b49a2180a68f6c96815ebd9b7f6b5ab7 (patch) | |
| tree | 09d112663ca6e6b8255b58fec64522b2b6888c8d /animism-align/frontend/app/utils | |
| parent | 064e8652dc4fae7167e3cd34a6fbe6b36e6239d1 (diff) | |
section 2 carousel
Diffstat (limited to 'animism-align/frontend/app/utils')
| -rw-r--r-- | animism-align/frontend/app/utils/viewer.utils.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/animism-align/frontend/app/utils/viewer.utils.js b/animism-align/frontend/app/utils/viewer.utils.js new file mode 100644 index 0000000..b61f998 --- /dev/null +++ b/animism-align/frontend/app/utils/viewer.utils.js @@ -0,0 +1,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] +} |
