diff --git a/src/utils/note-utils.ts b/src/utils/note-utils.ts index a49445f..53aa23b 100644 --- a/src/utils/note-utils.ts +++ b/src/utils/note-utils.ts @@ -11,7 +11,7 @@ function getNoteText(note: Note): string { } export async function getNoteMessage(userId: string, page: number): Promise { - const notes = await Database.getNotes(userId); + const notes = (await Database.getNotes(userId)).sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()); page = page - 1;