Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2938 notify fix (#4813)

Tom Cariello4ce77b8ab713
diff --git a/web/js/containers/info.js b/web/js/containers/info.js
index 1ff243a9d..0ad4fcfc8 100644
--- a/web/js/containers/info.js
+++ b/web/js/containers/info.js
@@ -149,7 +149,7 @@ function InfoList (props) {
arr.splice(1, 0, getExploreWorldviewObj());
}
}
- if (notifications.isActive && notifications.number > 0) {
+ if (notifications.isActive && notifications.total > 0) {
arr.splice(2, 0, getNotificationListItem());
}
arr.push(getDistractionFreeObj());
diff --git a/web/js/modules/notifications/reducers.js b/web/js/modules/notifications/reducers.js
index db0e4a8fc..a706053c2 100644
--- a/web/js/modules/notifications/reducers.js
+++ b/web/js/modules/notifications/reducers.js
@@ -31,6 +31,7 @@ export function notificationsReducer(state = notificationReducerState, action) {
const numberOutagesUnseen = notificationsByType.outages.length;
return {
...state,
+ total: getCount(notificationsByType),
number: getCount(notificationsByType),
numberUnseen: getCount(notificationsByType),
numberOutagesUnseen,
diff --git a/web/js/modules/notifications/reducers.test.js b/web/js/modules/notifications/reducers.test.js
index 5603c8705..4df4aaf78 100644
--- a/web/js/modules/notifications/reducers.test.js
+++ b/web/js/modules/notifications/reducers.test.js
@@ -56,6 +56,7 @@ describe('notificationsReducer', () => {
numberOutagesUnseen: 1,
numberUnseen: 1,
type: 'outage',
+ total: 1,
isActive: true,
object: constants.MOCK_SORTED_NOTIFICATIONS,
});