Set posts/1 to posts in prev link

This commit is contained in:
Sat Naing
2022-09-21 09:27:17 +06:30
parent 3cff5cabb1
commit ed6a259481
+1 -1
View File
@@ -37,7 +37,7 @@ const next = pageNum < totalPages ? "" : "disabled";
<nav class="pagination-wrapper" aria-label="Pagination Navigation"> <nav class="pagination-wrapper" aria-label="Pagination Navigation">
<LinkButton <LinkButton
tabindex={prev === "disabled" ? "-1" : "0"} tabindex={prev === "disabled" ? "-1" : "0"}
href={`/posts/${pageNum - 1}`} href={`/posts${pageNum - 1 !== 1 ? "/" + (pageNum - 1) : ""}`}
className={`mr-4 select-none ${prev}`} className={`mr-4 select-none ${prev}`}
> >
<svg xmlns="http://www.w3.org/2000/svg" class={`${prev}-svg`}> <svg xmlns="http://www.w3.org/2000/svg" class={`${prev}-svg`}>