mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 15:10:19 +00:00
主题分页相关调整
This commit is contained in:
@@ -15,7 +15,7 @@ export default function BlogListPage(props) {
|
||||
const { page = 1, posts, postCount } = props
|
||||
const router = useRouter()
|
||||
const { NOTION_CONFIG } = useGlobal()
|
||||
const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
|
||||
const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG)
|
||||
const totalPage = Math.ceil(postCount / POSTS_PER_PAGE)
|
||||
const currentPage = +page
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function BlogListScroll(props) {
|
||||
const { posts } = props
|
||||
const { locale, NOTION_CONFIG } = useGlobal()
|
||||
const [page, updatePage] = useState(1)
|
||||
const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', 12, NOTION_CONFIG)
|
||||
const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG)
|
||||
let hasMore = false
|
||||
const postsToShow = posts
|
||||
? Object.assign(posts).slice(0, POSTS_PER_PAGE * page)
|
||||
|
||||
Reference in New Issue
Block a user