diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-09 15:30:05 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-09 15:30:05 +0900 |
commit | c913dcdec775094daa9a64fa40034b3122320660 (patch) | |
tree | 978f2ad2581bc069e9369b28fe743b91c09f18a3 /src/settings/reducers | |
parent | 355c0c64575adad4886647a1df3da173598b558b (diff) |
parse json in settings
Diffstat (limited to 'src/settings/reducers')
-rw-r--r-- | src/settings/reducers/setting.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/settings/reducers/setting.js b/src/settings/reducers/setting.js index f7d9242..7f32f72 100644 --- a/src/settings/reducers/setting.js +++ b/src/settings/reducers/setting.js @@ -1,15 +1,17 @@ import actions from 'settings/actions'; const defaultState = { - settings: {} + json: '', + value: {} }; export default function reducer(state = defaultState, action = {}) { switch (action.type) { case actions.SETTING_SET_SETTINGS: - return Object.assign({}, state, { - settings: action.settings, - }); + return { + json: action.json, + value: action.value, + }; default: return state; } |