24 lines
503 B
JavaScript
Raw Normal View History

/**
*
* SettingPage reducer
*/
import { fromJS } from 'immutable';
import { ON_CLICK_EDIT_LIST_ITEM } from './constants';
const initialState = fromJS({
2018-07-04 16:49:15 +02:00
listItemToEdit: fromJS({}),
indexListItemToEdit: 0,
});
function settingPageReducer(state = initialState, action) {
switch (action.type) {
case ON_CLICK_EDIT_LIST_ITEM:
2018-07-04 16:49:15 +02:00
return state
.update('listItemToEdit', () => fromJS(action.listItemToEdit));
default:
return state;
}
}
export default settingPageReducer;