From 20ac1ea280ca21fcc45dd0cac50b8b8cbb8d4694 Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Wed, 12 Nov 2025 19:55:43 +0000 Subject: [PATCH] fix: disable pagination when ahead of last page --- src/components/mii-list/pagination.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/mii-list/pagination.tsx b/src/components/mii-list/pagination.tsx index 41526a8..386ef23 100644 --- a/src/components/mii-list/pagination.tsx +++ b/src/components/mii-list/pagination.tsx @@ -79,12 +79,12 @@ export default function Pagination({ lastPage }: Props) { {/* Next page */} = lastPage ? "#" : createPageUrl(page + 1)} aria-label="Go to Next Page" - aria-disabled={page === lastPage} - tabIndex={page === lastPage ? -1 : undefined} + aria-disabled={page >= lastPage} + tabIndex={page >= lastPage ? -1 : undefined} className={`pill button bg-orange-100! p-0.5! aspect-square text-2xl ${ - page === lastPage ? "pointer-events-none opacity-50" : "hover:bg-orange-400!" + page >= lastPage ? "pointer-events-none opacity-50" : "hover:bg-orange-400!" }`} > @@ -92,12 +92,12 @@ export default function Pagination({ lastPage }: Props) { {/* Go to last page */} = lastPage ? "#" : createPageUrl(lastPage)} aria-label="Go to Last Page" - aria-disabled={page === lastPage} - tabIndex={page === lastPage ? -1 : undefined} + aria-disabled={page >= lastPage} + tabIndex={page >= lastPage ? -1 : undefined} className={`pill button bg-orange-100! p-0.5! aspect-square text-2xl ${ - page === lastPage ? "pointer-events-none opacity-50" : "hover:bg-orange-400!" + page >= lastPage ? "pointer-events-none opacity-50" : "hover:bg-orange-400!" }`} >