1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 15:16:40 -04:00

prepare for new next/link behavior

see new-next-link branch
This commit is contained in:
2022-04-28 12:32:50 -04:00
parent ad1d1bbce1
commit e1da53a1fe
9 changed files with 13 additions and 16 deletions

View File

@ -25,7 +25,7 @@ export const getStaticProps: GetStaticProps = async () => {
const notes = await getAllNotes();
const notesByYear: NotesListProps["notesByYear"] = {};
notes.map((note) => {
notes.forEach((note) => {
const year = new Date(note.date).getUTCFullYear();
(notesByYear[year] || (notesByYear[year] = [])).push(note);
});