From 85d5c83d1ffcdff6dcf5a17a9d0a362c30798da5 Mon Sep 17 00:00:00 2001 From: Typehoon Date: Mon, 5 Aug 2024 18:57:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9Agame=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E7=9A=84Page=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=B8=8B=EF=BC=8C=E5=90=91=E5=90=8E=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5"Next"=E6=8C=89=E9=92=AE=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/game/components/BlogListPage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/game/components/BlogListPage.js b/themes/game/components/BlogListPage.js index 139eb783..dc1df2a6 100644 --- a/themes/game/components/BlogListPage.js +++ b/themes/game/components/BlogListPage.js @@ -1,3 +1,4 @@ +import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import { GameListIndexCombine } from './GameListIndexCombine' import PaginationSimple from './PaginationSimple' @@ -9,7 +10,8 @@ import PaginationSimple from './PaginationSimple' export const BlogListPage = props => { const { page = 1, postCount } = props const { NOTION_CONFIG } = useGlobal() - const totalPage = Math.ceil(postCount / NOTION_CONFIG) + const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG) + const totalPage = Math.ceil(postCount / POSTS_PER_PAGE) const showNext = page < totalPage return (