Fix casing discrepancies.

This commit is contained in:
tangly1024
2022-03-16 09:42:54 +08:00
parent 3c056ba096
commit c5d6f04f11
192 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import BlogPostCard from './BlogPostCard'
import BLOG from '@/blog.config'
import BlogPostListEmpty from './BlogPostListEmpty'
import PaginationSimple from './PaginationSimple'
import { useRouter } from 'next/router'
/**
* 文章列表分页表格
* @param page 当前页
* @param posts 所有文章
* @param tags 所有标签
* @returns {JSX.Element}
* @constructor
*/
const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE)
if (!posts || posts.length === 0) {
return <BlogPostListEmpty />
} else {
return (
<div id="container" className='w-full justify-center'>
{/* 文章列表 */}
{posts.map(post => (
<BlogPostCard key={post.id} post={post} />
))}
<PaginationSimple page={page} totalPage={totalPage} />
</div>
)
}
}
export default BlogPostListPage