Files
old-new-wiaas/frontend/src/reducers/notification/notificationReducers.js

18 lines
454 B
JavaScript
Raw Normal View History

2018-06-14 16:49:28 +02:00
import {UPDATE_MESSAGES} from '../../constants/notificationConstants';
const moduleReducers = {};
moduleReducers[UPDATE_MESSAGES] = (state, action) => {
return Object.assign({}, state, {
updateMessages: action.updateMessages
});
};
const notificationReducer = (state = {}, action) => {
return moduleReducers[action.type]
? moduleReducers[action.type](state, action)
: state;
};
export default notificationReducer;