fix: hide pager when only first page (#335)

* fix: hide pager when only first page

* fix: lints and formatting

---------

Co-authored-by: Jas Singh <jaskiratpal.singh@outlook.com>
This commit is contained in:
Rubin Bhandari
2024-10-21 02:24:16 +05:45
committed by GitHub
parent 5b01d3e60e
commit 7a2d91744f

View File

@@ -21,7 +21,7 @@ export const NotificationPager = (curPage: Variable<number>): 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 [