fix: dashboard edit previews, migration journal, and notes comments
Register drizzle journal entries for 0022/0023 so prod migrations apply. Key edit-mode widget previews by index so bangs.stats shows live data. Add comments to notes detail pages.
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { getCurrentSession } from "@/lib/session";
|
||||
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);
|
||||
const [{ user }, note] = await Promise.all([getCurrentSession(), getNote(id).catch(() => null)]);
|
||||
if (!note) notFound();
|
||||
|
||||
return <NoteEditor note={note} />;
|
||||
return <NoteEditor note={note} currentUserId={user.id} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user