diff --git a/components/BlogPostListPage.js b/components/BlogPostListPage.js index d4217107..f18d5d62 100644 --- a/components/BlogPostListPage.js +++ b/components/BlogPostListPage.js @@ -34,11 +34,6 @@ const BlogPostListPage = ({ page = 1, posts = [], tags }) => { BLOG.postsPerPage * (page - 1), BLOG.postsPerPage * page ) - let showNext = false - if (filteredBlogPosts) { - const totalPosts = filteredBlogPosts.length - showNext = page * BLOG.postsPerPage < totalPosts - } if (!postsToShow || postsToShow.length === 0) { return @@ -52,7 +47,7 @@ const BlogPostListPage = ({ page = 1, posts = [], tags }) => { ))} - + ) } diff --git a/components/PaginationNumber.js b/components/PaginationNumber.js index 8ee12d3e..36de638b 100644 --- a/components/PaginationNumber.js +++ b/components/PaginationNumber.js @@ -11,9 +11,10 @@ import { faAngleLeft, faAngleRight } from '@fortawesome/free-solid-svg-icons' * @returns {JSX.Element} * @constructor */ -const PaginationNumber = ({ page, showNext, totalPage }) => { +const PaginationNumber = ({ page, totalPage }) => { const router = useRouter() const currentPage = +page + const showNext = page !== totalPage const pages = generatePages(page, currentPage, totalPage) return (