diff --git a/src/App.tsx b/src/App.tsx index d11e7cb..a48b7e5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -315,6 +315,12 @@ function App() { note.content.toLowerCase().includes(search); } return true; + }).sort((a, b) => { + // Sort favorites first, then by modified date (newest first) + if (a.favorite !== b.favorite) { + return a.favorite ? -1 : 1; + } + return b.modified - a.modified; }); const selectedNote = notes.find(n => n.id === selectedNoteId) || null;