import Link from "next/link"; import Markdown from "markdown-to-jsx"; import { format } from "date-fns"; import styles from "./List.module.scss"; type NoteProps = { title: string; date: string; slug: string; }; const List = ({ notesByYear }) => { const sections = []; Object.entries(notesByYear).forEach(([year, notes]: [string, NoteProps[]]) => { sections.push(

{year}

); }); // grouped notes enter this component ordered chronologically -- we want reverse chronological const reversed = sections.reverse(); return <>{reversed}; }; export default List;