theme-game 微调

This commit is contained in:
tangly1024.com
2024-03-22 17:08:40 +08:00
parent 8b407f0ec4
commit dedbb0f811
10 changed files with 188 additions and 82 deletions

View File

@@ -1,13 +1,25 @@
import { siteConfig } from '@/lib/config'
import { GameListIndexCombine } from './GameListIndexCombine'
import PaginationSimple from './PaginationSimple'
/**
* 分页博客列表
* @param {*} props
* @returns
*/
export const BlogListPage = props => {
const { page = 1, postCount } = props
const totalPage = Math.ceil(
postCount / parseInt(siteConfig('POSTS_PER_PAGE'))
)
const showNext = page < totalPage
return (
<>
<div id='posts-wrapper' className='my-4 select-none'>
<GameListIndexCombine {...props} />
</div>
{/* 这里不显示分页组件,首页只展示部分即可 */}
<PaginationSimple page={page} showNext={showNext} />
</>
)
}