From 401db3787ec61523f32af1a691de5392f428ca0c Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 18 Oct 2024 10:51:03 -0700 Subject: [PATCH] fix: Remove /page/1 link --- src/lib/components/PostList.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/components/PostList.svelte b/src/lib/components/PostList.svelte index 1c4968e..d2de152 100644 --- a/src/lib/components/PostList.svelte +++ b/src/lib/components/PostList.svelte @@ -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}`;