Skip to content

Commit

Permalink
chore: total undefined disable next
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed May 22, 2024
1 parent 3345489 commit 3603201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Pagination/hooks/usePagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];

Expand Down

0 comments on commit 3603201

Please sign in to comment.