import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import Link from 'next/link' import { useRouter } from 'next/router' import LayoutBase from './LayoutBase' export const LayoutPage = props => { const { page } = props const { posts, postCount } = props const { locale } = useGlobal() const router = useRouter() const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE) const showNext = page < totalPage && posts.length === BLOG.POSTS_PER_PAGE && posts.length < postCount const currentPage = +page return ( {posts.map(p => (
{p.title}
{p.summary}
))}
) }