From 36032018e3def2bd7cc77e6746148a4339b2a4af Mon Sep 17 00:00:00 2001 From: GermanVor Date: Wed, 22 May 2024 14:02:33 +0200 Subject: [PATCH] chore: total undefined disable next --- src/components/Pagination/hooks/usePagination.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Pagination/hooks/usePagination.ts b/src/components/Pagination/hooks/usePagination.ts index 0f1669ec92..c0704fe870 100644 --- a/src/components/Pagination/hooks/usePagination.ts +++ b/src/components/Pagination/hooks/usePagination.ts @@ -18,7 +18,7 @@ export function usePagination({ }: UsePaginationArgs): UsePaginationReturn { const numberOfPages = getNumberOfPages(pageSize, total); const hasTotal = numberOfPages !== 0; - const isNextDisabled = (hasTotal && page === numberOfPages) || total === 0; + const isNextDisabled = hasTotal === false || page === numberOfPages; let items: PaginationItem[];