feature/IO-3026-Enhanced-Notifications - final revisions
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -92,19 +92,11 @@ const applicationReducer = (state = INITIAL_STATE, action) => {
|
||||
case ApplicationActionTypes.SET_WSS_STATUS: {
|
||||
return { ...state, wssStatus: action.payload };
|
||||
}
|
||||
case ApplicationActionTypes.SET_ALERTS: {
|
||||
const alertsMap = {};
|
||||
action.payload.forEach((alert) => {
|
||||
alertsMap[alert.id] = alert;
|
||||
});
|
||||
return {
|
||||
...state,
|
||||
alerts: alertsMap
|
||||
};
|
||||
}
|
||||
|
||||
case ApplicationActionTypes.ADD_ALERTS: {
|
||||
const newAlertsMap = { ...state.alerts };
|
||||
action.payload.forEach((alert) => {
|
||||
|
||||
action.payload.alerts.forEach((alert) => {
|
||||
newAlertsMap[alert.id] = alert;
|
||||
});
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user