Create "config" redux action file the including following actions:

- CHANGE_LANGUAGE
- TOGGLE_LANGUAGE_DROPDOWN
- CHANGE_NODE
- TOGGLE_NODE_DROPDOWN
This commit is contained in:
Daniel Ternyak 2017-04-14 01:17:22 -05:00
parent c2745c985e
commit 736ad23f1c

24
common/actions/config.js Normal file
View File

@ -0,0 +1,24 @@
export const CONFIG_LANGUAGE_CHANGE = 'CONFIG_LANGUAGE_CHANGE';
export const CONFIG_LANGUAGE_DROPDOWN_TOGGLE = 'CONFIG_LANGUAGE_DROPDOWN_TOGGLE';
export const CONFIG_NODE_CHANGE = 'CONFIG_NODE_CHANGE';
export const CONFIG_NODE_DROPDOWN_TOGGLE = 'CONFIG_NODE_DROPDOWN_TOGGLE';
export const CHANGE_LANGUAGE = (index) => ({
type: CONFIG_LANGUAGE_CHANGE, index: index
})
export const TOGGLE_LANGUAGE_DROPDOWN = () => ({
type: CONFIG_LANGUAGE_DROPDOWN_TOGGLE
})
export const CHANGE_NODE = (index) => ({
type: CONFIG_NODE_CHANGE, index: index
})
export const TOGGLE_NODE_DROPDOWN = () => ({
type: CONFIG_NODE_DROPDOWN_TOGGLE
})