diff --git a/components/PaginationNumber.js b/components/PaginationNumber.js index ea5114db..a42c5a06 100644 --- a/components/PaginationNumber.js +++ b/components/PaginationNumber.js @@ -48,7 +48,7 @@ const PaginationNumber = ({ page, showNext, totalPage }) => { } function getPageElement (page, currentPage) { - return + return {page} diff --git a/pages/page/[page].js b/pages/page/[page].js index e7a86cb8..a7dc5e70 100644 --- a/pages/page/[page].js +++ b/pages/page/[page].js @@ -31,9 +31,7 @@ export async function getStaticPaths () { const totalPages = Math.ceil(allPosts / BLOG.postsPerPage) return { // remove first page, we 're not gonna handle that. - paths: Array.from({ length: totalPages - 1 }, (_, i) => ({ - params: { page: '' + (i + 2) } - })), + paths: Array.from({ length: totalPages - 1 }, (_, i) => `/page/${(i + 2)}`), fallback: true } }