fix: Remove /page/1 link
This commit is contained in:
parent
38aeb1e80d
commit
401db3787e
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue