From eb06801026f544b7962db2a5dfe3f05380e24b25 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 14 Oct 2024 10:45:43 +0100 Subject: [PATCH] make the mobile pagination more useful --- .../website/src/components/input/pagination.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/projects/website/src/components/input/pagination.tsx b/projects/website/src/components/input/pagination.tsx index 7ec1aad..76a74c0 100644 --- a/projects/website/src/components/input/pagination.tsx +++ b/projects/website/src/components/input/pagination.tsx @@ -112,7 +112,7 @@ export default function Pagination({ startPage = Math.max(1, endPage - maxPagesToShow + 1); } - if (startPage > 1 && !mobilePagination) { + if (startPage > 1) { pageNumbers.push( <> @@ -120,7 +120,7 @@ export default function Pagination({ 1 - {startPage > 2 && ( + {startPage > 2 && !mobilePagination && ( @@ -147,7 +147,7 @@ export default function Pagination({ }; return ( - + {/* Previous button - disabled on the first page */} @@ -161,11 +161,13 @@ export default function Pagination({ {renderPageNumbers()} - {!mobilePagination && currentPage < totalPages && totalPages - currentPage > 2 && ( + {currentPage < totalPages && totalPages - currentPage > 2 && ( <> - - - + {!mobilePagination && ( + + + + )}