parse json in settings
This commit is contained in:
parent
355c0c6457
commit
c913dcdec7
7 changed files with 24 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Reference in a new issue