From 7a2d91744fd4ff9e06075a9ef988b73e56277ea1 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Mon, 21 Oct 2024 02:24:16 +0545 Subject: [PATCH] fix: hide pager when only first page (#335) * fix: hide pager when only first page * fix: lints and formatting --------- Co-authored-by: Jas Singh --- modules/menus/notifications/pager/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/menus/notifications/pager/index.ts b/modules/menus/notifications/pager/index.ts index 62dd1bf..1a4571b 100644 --- a/modules/menus/notifications/pager/index.ts +++ b/modules/menus/notifications/pager/index.ts @@ -21,7 +21,7 @@ export const NotificationPager = (curPage: Variable): BoxWidget => { showPager.bind('value'), ], (currentPage: number, dispTotal: number, _: Notification[], showPgr: boolean) => { - if (showPgr === false) { + if (showPgr === false || (currentPage === 1 && notifs.notifications.length <= dispTotal)) { return []; } return [