diff --git a/src/pages/notes/[...page].astro b/src/pages/notes/[...page].astro index 4c4c9ff..55f0712 100644 --- a/src/pages/notes/[...page].astro +++ b/src/pages/notes/[...page].astro @@ -3,7 +3,7 @@ import { type CollectionEntry, getCollection } from "astro:content"; import Pagination from "@/components/Paginator.astro"; import Note from "@/components/note/Note.astro"; import PageLayout from "@/layouts/Base.astro"; -import { collectionModifiedDateSort } from "@/utils/date"; +import { collectionDateSort } from "@/utils/date"; import type { GetStaticPaths, Page } from "astro"; import { Icon } from "astro-icon/components"; @@ -11,7 +11,7 @@ export const getStaticPaths = (async ({ paginate }) => { const MAX_NOTES_PER_PAGE = 10; const allNotes = await getCollection("note"); const notesCount = allNotes.length; - return paginate(allNotes.sort(collectionModifiedDateSort), { + return paginate(allNotes.sort(collectionDateSort), { pageSize: MAX_NOTES_PER_PAGE, props: { notesCount }, }); diff --git a/src/pages/notes/list/[...page].astro b/src/pages/notes/list/[...page].astro index e0ebe87..62ad758 100644 --- a/src/pages/notes/list/[...page].astro +++ b/src/pages/notes/list/[...page].astro @@ -3,7 +3,7 @@ import { type CollectionEntry, getCollection } from "astro:content"; import Pagination from "@/components/Paginator.astro"; import Note from "@/components/note/Note.astro"; import PageLayout from "@/layouts/Base.astro"; -import { collectionModifiedDateSort } from "@/utils/date"; +import { collectionDateSort } from "@/utils/date"; import type { GetStaticPaths, Page } from "astro"; import { Icon } from "astro-icon/components"; @@ -11,7 +11,7 @@ export const getStaticPaths = (async ({ paginate }) => { const MAX_NOTES_PER_PAGE = 10; const allNotes = await getCollection("note"); const notesCount = allNotes.length; - return paginate(allNotes.sort(collectionModifiedDateSort), { + return paginate(allNotes.sort(collectionDateSort), { pageSize: MAX_NOTES_PER_PAGE, props: { notesCount }, });