From c6eb5553d0477f96b5edd48012b4c4ab342f026c Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 22 Oct 2017 17:45:16 +0900 Subject: add setting actions in content --- src/content/reducers/setting.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/content/reducers/setting.js (limited to 'src/content/reducers/setting.js') diff --git a/src/content/reducers/setting.js b/src/content/reducers/setting.js new file mode 100644 index 0000000..22fac6f --- /dev/null +++ b/src/content/reducers/setting.js @@ -0,0 +1,13 @@ +import actions from 'content/actions'; + +const defaultState = {}; + +export default function reducer(state = defaultState, action = {}) { + switch (action.type) { + case actions.SETTING_SET: + return Object.assign({}, action.value); + default: + return state; + } +} + -- cgit v1.2.3