fix: ページカウントのズレを修正

This commit is contained in:
moris 2024-12-29 10:28:38 +09:00
parent 431e51bb7e
commit 0c9c94ce85

View File

@ -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}
}