fix: Remove /page/1 link

This commit is contained in:
Leni Aniva 2024-10-18 10:51:03 -07:00
parent 38aeb1e80d
commit 401db3787e
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,8 @@
const disableLinkPrev = pageN == 1;
const disableLinkNext = pageN == maxPageN;
const prevLink = pageN == 1 ? "/post" : `/page/${pageN - 1}`;
const firstPageLink = "/post";
const prevLink = pageN <= 2 ? firstPageLink : `/page/${pageN - 1}`;
</script>
<ul id="catalog" class="content">
@ -27,7 +28,7 @@
<a
class="nav-link icon"
class:disabled-link={disableLinkPrev}
href="/post"><DoubleArrowLeft /></a>
href={firstPageLink}><DoubleArrowLeft /></a>
<a
class="nav-link icon"
class:disabled-link={disableLinkPrev}