in client/src/reducers/unreadsReducer.js [22:37]
export default (state = initialState, action) => {
switch (action.type) {
case NEW_MESSAGE:
return {
...state,
[action.room]: state[action.room] + 1 || 1,
};
case RESET_UNREADS:
return {
...state,
[action.room]: 0,
};
default:
return state;
}
};