From 45c44989c8fb6e24badd18bb83ac5f68de0aceaf Mon Sep 17 00:00:00 2001 From: kibigo! Date: Fri, 17 Nov 2017 19:11:18 -0800 Subject: Forking glitch theme --- app/javascript/themes/glitch/reducers/modal.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/javascript/themes/glitch/reducers/modal.js (limited to 'app/javascript/themes/glitch/reducers/modal.js') diff --git a/app/javascript/themes/glitch/reducers/modal.js b/app/javascript/themes/glitch/reducers/modal.js new file mode 100644 index 000000000..97fb31203 --- /dev/null +++ b/app/javascript/themes/glitch/reducers/modal.js @@ -0,0 +1,17 @@ +import { MODAL_OPEN, MODAL_CLOSE } from 'themes/glitch/actions/modal'; + +const initialState = { + modalType: null, + modalProps: {}, +}; + +export default function modal(state = initialState, action) { + switch(action.type) { + case MODAL_OPEN: + return { modalType: action.modalType, modalProps: action.modalProps }; + case MODAL_CLOSE: + return initialState; + default: + return state; + } +}; -- cgit