import Link from 'next/link'; import Layout from '../../components/layout'; import date from '../../lib/date'; import { getNotesMeta, INoteMeta } from '../../lib/slug'; function NotesPage({ notesMeta }: { notesMeta: INoteMeta[] }) { return ( {notesMeta && notesMeta.map((note: INoteMeta, i) => { return ( )})}
{note.title} {note.last_updated && date.toRelativeDate(new Date(note.last_updated))}
) } export async function getStaticProps() { return { props: { notesMeta: getNotesMeta() } }; } export default NotesPage;