Compare commits

..

1 commit

Author SHA1 Message Date
radishsoups
08e18cbd7e
Merge d331d8ed46 into 09a70a87bd 2026-04-27 19:29:26 -04:00
2 changed files with 1 additions and 10 deletions

View file

@ -54,7 +54,7 @@
</script>
<link href="/src/index.css" rel="stylesheet" />
<script defer src="https://analytics.trafficlunar.net/script.js" data-website-id="1fb21e50-8f85-40cc-8475-647872173bc6"></script>
<script defer src="https://analytics.trafficlunar.net/script.js" data-website-id="bc530384-9b7d-471a-b2e3-f9859da50c24"></script>
</head>
<body>
<div id="root"></div>

View file

@ -11,10 +11,6 @@ export default function Pagination({ lastPage }: Props) {
const [searchParams] = useSearchParams();
const page = Number(searchParams.get("page") ?? 1);
const scrollToTop = useCallback(() => {
window.scrollTo({ top: 0 });
}, []);
const createPageUrl = useCallback(
(pageNumber: number) => {
const params = new URLSearchParams(searchParams);
@ -41,7 +37,6 @@ export default function Pagination({ lastPage }: Props) {
{/* Go to first page */}
<Link
to={page === 1 ? "#" : createPageUrl(1)}
onClick={page === 1 ? undefined : scrollToTop}
aria-label="Go to First Page"
aria-disabled={page === 1}
tabIndex={page === 1 ? -1 : undefined}
@ -53,7 +48,6 @@ export default function Pagination({ lastPage }: Props) {
{/* Previous page */}
<Link
to={page === 1 ? "#" : createPageUrl(page - 1)}
onClick={page === 1 ? undefined : scrollToTop}
aria-label="Go to Previous Page"
aria-disabled={page === 1}
tabIndex={page === 1 ? -1 : undefined}
@ -68,7 +62,6 @@ export default function Pagination({ lastPage }: Props) {
<Link
key={number}
to={createPageUrl(number)}
onClick={scrollToTop}
aria-label={`Go to Page ${number}`}
aria-current={number === page ? "page" : undefined}
className={`pill p-0! w-8 h-8 text-center rounded-md! ${number == page ? "bg-orange-400!" : "bg-orange-100! hover:bg-orange-400!"}`}
@ -81,7 +74,6 @@ export default function Pagination({ lastPage }: Props) {
{/* Next page */}
<Link
to={page >= lastPage ? "#" : createPageUrl(page + 1)}
onClick={page >= lastPage ? undefined : scrollToTop}
aria-label="Go to Next Page"
aria-disabled={page >= lastPage}
tabIndex={page >= lastPage ? -1 : undefined}
@ -93,7 +85,6 @@ export default function Pagination({ lastPage }: Props) {
{/* Go to last page */}
<Link
to={page >= lastPage ? "#" : createPageUrl(lastPage)}
onClick={page >= lastPage ? undefined : scrollToTop}
aria-label="Go to Last Page"
aria-disabled={page >= lastPage}
tabIndex={page >= lastPage ? -1 : undefined}