verdnatura-chat/app/reducers/settings.js

18 lines
310 B
JavaScript

import { SETTINGS } from '../actions/actionsTypes';
const initialState = {};
export default (state = initialState, action) => {
switch (action.type) {
case SETTINGS.ADD:
return {
...state,
...action.payload
};
case SETTINGS.CLEAR:
return initialState;
default:
return state;
}
};