From 011a0c69156f8bcd0e05b5dc2032f6aaae24aae5 Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Fri, 6 Oct 2023 17:10:00 +0200 Subject: [PATCH] Fix: collapse notification is more than max + 1 (#2597) --- src/components/notification-center/NotificationCenter/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/notification-center/NotificationCenter/index.tsx b/src/components/notification-center/NotificationCenter/index.tsx index c89d72f015..01908cd02a 100644 --- a/src/components/notification-center/NotificationCenter/index.tsx +++ b/src/components/notification-center/NotificationCenter/index.tsx @@ -45,7 +45,7 @@ const NotificationCenter = (): ReactElement => { const canExpand = notifications.length > NOTIFICATION_CENTER_LIMIT + 1 const notificationsToShow = - canExpand && showAll ? chronologicalNotifications : chronologicalNotifications.slice(0, NOTIFICATION_CENTER_LIMIT) + showAll || !canExpand ? chronologicalNotifications : chronologicalNotifications.slice(0, NOTIFICATION_CENTER_LIMIT) const unreadCount = useMemo(() => notifications.filter(({ isRead }) => !isRead).length, [notifications]) const hasUnread = unreadCount > 0