import Link from 'next/link'; import Layout from '../../components/layout'; import date from '../../lib/date'; import { getPostsMeta, IPostMeta } from '../../lib/slug'; function PostsPage({ postsMeta }: { postsMeta: IPostMeta[] }) { return ( { postsMeta.length && postsMeta.map((post: IPostMeta, i) => { return }) ||
**crickets**
No posts found...
Go Home
}
{ post.last_updated && `updated ${date.toRelativeDate(new Date(post.last_updated))}` }
{ date.toRelativeDate(new Date(post.created_at)) }
{post.title}
) } export async function getStaticProps() { return { props: { postsMeta: getPostsMeta() } }; } export default PostsPage;