Add notes module

This commit is contained in:
ginnoir
2026-05-06 04:10:50 -05:00
parent 016d01cc25
commit 5b434702ba
19 changed files with 775 additions and 24 deletions
+11
View File
@@ -0,0 +1,11 @@
import { notFound } from "next/navigation";
import { NoteEditor } from "@/modules/notes/components/note-editor";
import { getNote } from "@/modules/notes/server/queries";
export default async function NotePage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const note = await getNote(id).catch(() => null);
if (!note) notFound();
return <NoteEditor note={note} />;
}
+5
View File
@@ -0,0 +1,5 @@
import { NoteEditor } from "@/modules/notes/components/note-editor";
export default function NewNotePage() {
return <NoteEditor />;
}
+7
View File
@@ -0,0 +1,7 @@
import { NotesIndex } from "@/modules/notes/components/notes-index";
import { listNotes } from "@/modules/notes/server/queries";
export default async function NotesPage() {
const notes = await listNotes();
return <NotesIndex notes={notes} />;
}