summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
blob: 7f8e1c8db0787639170beff2ba46d2b5e1be5e47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import * as types from 'app/types'
import { store, history, dispatch } from 'app/store'
// import {  } from 'app/utils'
// import actions from 'app/actions'

export const showSection = section => dispatch => {
  dispatch({ type: types.viewer.toggle_section, key: section, value: true })
}
export const hideSection = section => dispatch => {
  dispatch({ type: types.viewer.toggle_section, key: section, value: false })
}
export const toggleSection = section => dispatch => {
  dispatch({ type: types.viewer.toggle_section, key: section, value: !store.getState().viewer[section] })
}