import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import CONFIG from '../config' import BlogPostCard from './BlogPostCard' import PaginationNumber from './PaginationNumber' export const BlogListPage = props => { const { page = 1, posts, postCount } = props const { NOTION_CONFIG } = useGlobal() const POSTS_PER_PAGE = siteConfig('POSTS_PER_PAGE', null, NOTION_CONFIG) const totalPage = Math.ceil(postCount / POSTS_PER_PAGE) const showPageCover = siteConfig('MOVIE_POST_LIST_COVER', null, CONFIG) if (!posts || posts.length === 0) { return null } return (
{posts?.map(post => ( ))}
) }