From 0c9c94ce85822055344e8e37bfe88e143a4df0a9 Mon Sep 17 00:00:00 2001 From: moris Date: Sun, 29 Dec 2024 10:28:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=AB?= =?UTF-8?q?=E3=82=A6=E3=83=B3=E3=83=88=E3=81=AE=E3=82=BA=E3=83=AC=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/(DefaultStyle)/[slug]/+page.server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/(DefaultStyle)/[slug]/+page.server.js b/src/routes/(DefaultStyle)/[slug]/+page.server.js index 932c041..7e1d3d0 100644 --- a/src/routes/(DefaultStyle)/[slug]/+page.server.js +++ b/src/routes/(DefaultStyle)/[slug]/+page.server.js @@ -5,7 +5,7 @@ export async function load({params}){ const postList = await Metas() const posts = postList.slice(pageNo*12, (pageNo+1)*12); - const lastPage = Math.trunc(postList.length/12); - + const lastPage = Math.ceil(postList.length/12)-1; + return {posts, pageNo, lastPage} } \ No newline at end of file