From 390fdf840b6bda1c830af18c912db1234baa3ebb Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 22 Jul 2020 17:09:28 +0200 Subject: route to component for testing purposes --- animism-align/frontend/app/views/viewer/viewer.actions.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js') diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js index ed59793..7f8e1c8 100644 --- a/animism-align/frontend/app/views/viewer/viewer.actions.js +++ b/animism-align/frontend/app/views/viewer/viewer.actions.js @@ -2,3 +2,13 @@ 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] }) +} -- cgit v1.2.3-70-g09d2