es lint !
All checks were successful
Deploy SSR / deploy (push) Successful in 1m11s

This commit is contained in:
Lee 2024-09-11 21:27:32 +01:00
parent 6571bfd648
commit 74f595e11a

@ -52,7 +52,7 @@ export default function Pagination({ mobilePagination, page, totalPages, onPageC
const pageNumbers = [];
const maxPagesToShow = mobilePagination ? 3 : 4;
let startPage = Math.max(1, currentPage - Math.floor(maxPagesToShow / 2));
let endPage = Math.min(totalPages, startPage + maxPagesToShow - 1);
const endPage = Math.min(totalPages, startPage + maxPagesToShow - 1);
if (endPage - startPage < maxPagesToShow - 1) {
startPage = Math.max(1, endPage - maxPagesToShow + 1);