fix: pagination number (#8504)

pull/8480/head^2
Arik Chakma 1 week ago committed by GitHub
parent 8b69b266d5
commit f279aea1cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      src/components/Pagination/Pagination.tsx

@ -31,6 +31,8 @@ export function Pagination(props: PaginationProps) {
}
const pages = usePagination(currPage, totalPages, 5);
const showingFrom = (currPage - 1) * perPage + 1;
const showingTo = Math.min(showingFrom + perPage - 1, totalCount);
return (
<div
@ -98,9 +100,9 @@ export function Pagination(props: PaginationProps) {
</button>
</div>
<span className="ml-2 hidden text-sm font-normal text-gray-500 sm:block">
Showing {formatCommaNumber((currPage - 1) * perPage)} to{' '}
{formatCommaNumber((currPage - 1) * perPage + perPage)} of{' '}
{formatCommaNumber(totalCount)} entries
Showing {formatCommaNumber(showingFrom)} to{' '}
{formatCommaNumber(showingTo)} of {formatCommaNumber(totalCount)}{' '}
entries
</span>
</div>
);

Loading…
Cancel
Save