import Link from 'next/link'; import Layout from '../../components/layout'; import date from '../../lib/date'; import PostsInfo from '../../public/posts.json'; function PostsPage() { return ( {Object.keys(PostsInfo).length && || } ) } function NoPosts() { return (<>
**crickets**
No posts found...
Go Home
); } function Posts() { const posts = Object.entries(PostsInfo); return ( <> { posts.map(([slug, post]: any, i: number) => { return })}
{ post.mtime && `Updated ${date.toRelativeDate(new Date(post.mtime))}` }
{date.toRelativeDate(new Date(post.otime))}
{post.title}
) } export default PostsPage;