From 58123210ab4cdd4a1f2b4720a0abbd88908baa06 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 8 Oct 2017 14:44:21 +0900 Subject: separate settings --- src/settings/reducers/setting.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/settings/reducers/setting.js (limited to 'src/settings/reducers') diff --git a/src/settings/reducers/setting.js b/src/settings/reducers/setting.js new file mode 100644 index 0000000..f7d9242 --- /dev/null +++ b/src/settings/reducers/setting.js @@ -0,0 +1,17 @@ +import actions from 'settings/actions'; + +const defaultState = { + settings: {} +}; + +export default function reducer(state = defaultState, action = {}) { + switch (action.type) { + case actions.SETTING_SET_SETTINGS: + return Object.assign({}, state, { + settings: action.settings, + }); + default: + return state; + } +} + -- cgit v1.2.3