This commit is contained in:
tangly1024.com
2023-11-06 16:28:01 +08:00
parent ecf7825dad
commit a0b481eaca
137 changed files with 326 additions and 383 deletions

View File

@@ -1,7 +1,7 @@
import BlogPostCard from './BlogPostCard'
import PaginationNumber from './PaginationNumber'
import BLOG from '@/blog.config'
import BlogPostListEmpty from './BlogPostListEmpty'
import { siteConfig } from '@/lib/config'
/**
* 文章列表分页表格
@@ -12,7 +12,7 @@ import BlogPostListEmpty from './BlogPostListEmpty'
* @constructor
*/
const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE)
const totalPage = Math.ceil(postCount / parseInt(siteConfig('POSTS_PER_PAGE')))
if (!posts || posts.length === 0) {
return <BlogPostListEmpty />