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