Skip to content

Commit

Permalink
Fix note sorting for other pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Einlar committed May 21, 2024
1 parent a1a067f commit e74d9cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/notes/[slug]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import NoteDetails from "@layouts/NoteDetails.astro";
import Notes from "@layouts/Notes.astro";
import getPageNumbers from "@utils/getPageNumbers";
import getPagination from "@utils/getPagination";
import getSortedNotes from "@utils/getSortedNotes";
import { getCollection, type CollectionEntry } from "astro:content";
export interface Props {
Expand All @@ -28,9 +29,8 @@ const { slug } = Astro.params;
const { note } = Astro.props;
const notes = await getCollection("notes");
const pagination = getPagination({
posts: notes,
posts: getSortedNotes(notes),
page: slug,
});
---
Expand Down

0 comments on commit e74d9cf

Please sign in to comment.