From 33029c39c02b26aa37d43b5bd93c68b075ae4f10 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Tue, 25 Mar 2025 13:43:01 -0300 Subject: [PATCH] fix: fix load more notifications only working once (#17094) The "load more" button in the notifications inbox were only working once. After taking a look at the code the issue was found and fixed. --- .../notifications/NotificationsInbox/NotificationsInbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/modules/notifications/NotificationsInbox/NotificationsInbox.tsx b/site/src/modules/notifications/NotificationsInbox/NotificationsInbox.tsx index 78d119a7e3..656d87fbe3 100644 --- a/site/src/modules/notifications/NotificationsInbox/NotificationsInbox.tsx +++ b/site/src/modules/notifications/NotificationsInbox/NotificationsInbox.tsx @@ -156,7 +156,7 @@ export const NotificationsInbox: FC = ({ error={error} isLoadingMoreNotifications={isLoadingMoreNotifications} hasMoreNotifications={Boolean( - inboxRes && inboxRes.notifications.length === NOTIFICATIONS_LIMIT, + inboxRes && inboxRes.notifications.length % NOTIFICATIONS_LIMIT === 0, )} onRetry={refetch} onMarkAllAsRead={markAllAsReadMutation.mutate}