Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2919 notify fix (#4721)

Tom Cariello165350e2ed05
diff --git a/web/js/modules/notifications/reducers.js b/web/js/modules/notifications/reducers.js
index 3d921c418..7db66dd14 100644
--- a/web/js/modules/notifications/reducers.js
+++ b/web/js/modules/notifications/reducers.js
@@ -28,9 +28,7 @@ export function notificationsReducer(state = notificationReducerState, action) {
case SET_NOTIFICATIONS:
if (action.array.length > 0) {
const notificationsByType = separateByType(action.array);
-
- const { layerNotices } = notificationsByType;
- const numberOutagesUnseen = layerNotices.filter((notice) => notice.notification_type === 'outage').length;
+ const numberOutagesUnseen = notificationsByType.outages.length;
return {
...state,
number: getCount(notificationsByType),
diff --git a/web/js/modules/notifications/reducers.test.js b/web/js/modules/notifications/reducers.test.js
index 830de32f8..b612f5c82 100644
--- a/web/js/modules/notifications/reducers.test.js
+++ b/web/js/modules/notifications/reducers.test.js
@@ -53,7 +53,7 @@ describe('notificationsReducer', () => {
}),
).toEqual({
number: 1,
- numberOutagesUnseen: 0,
+ numberOutagesUnseen: 1,
numberUnseen: 0,
type: 'outage',
isActive: true,