From c913dcdec775094daa9a64fa40034b3122320660 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 9 Oct 2017 15:30:05 +0900 Subject: parse json in settings --- src/settings/reducers/setting.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/settings/reducers') 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; } -- cgit v1.2.3