parse json in settings

This commit is contained in:
Shin'ya Ueoka 2017-10-09 15:30:05 +09:00
parent 355c0c6457
commit c913dcdec7
7 changed files with 24 additions and 28 deletions

View file

@ -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;
}