diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 14:44:21 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 14:44:21 +0900 |
commit | 58123210ab4cdd4a1f2b4720a0abbd88908baa06 (patch) | |
tree | b841120a6347313e34ba4a5ddbfd599e08aa6f16 /src/settings/reducers | |
parent | 541449b1fced9eea15f415b023206b10724f5315 (diff) |
separate settings
Diffstat (limited to 'src/settings/reducers')
-rw-r--r-- | src/settings/reducers/setting.js | 17 |
1 files changed, 17 insertions, 0 deletions
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; + } +} + |