diff --git a/web/pages/notifications.tsx b/web/pages/notifications.tsx index 8cdd2cb1..191747fe 100644 --- a/web/pages/notifications.tsx +++ b/web/pages/notifications.tsx @@ -179,15 +179,16 @@ function IncomeNotificationGroupItem(props: { (n) => n.sourceType ) for (const sourceType in groupedNotificationsBySourceType) { - const groupedNotificationsByContractId = groupBy( + // Source title splits by contracts and groups + const groupedNotificationsBySourceTitle = groupBy( groupedNotificationsBySourceType[sourceType], (notification) => { - return notification.sourceContractId + return notification.sourceTitle } ) - for (const contractId in groupedNotificationsByContractId) { + for (const contractId in groupedNotificationsBySourceTitle) { const notificationsForContractId = - groupedNotificationsByContractId[contractId] + groupedNotificationsBySourceTitle[contractId] if (notificationsForContractId.length === 1) { newNotifications.push(notificationsForContractId[0]) continue