refactor (v2): better arch
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -165,14 +165,14 @@ export function NoteCard({ note }: NoteCardProps) {
|
||||
</Card>
|
||||
|
||||
<Dialog open={editing} onOpenChange={setEditing}>
|
||||
<DialogContent className="max-w-3xl max-h-[85vh] flex flex-col p-6 gap-0 overflow-hidden">
|
||||
<DialogContent className="max-w-3xl max-h-[85dvh] flex flex-col p-6 gap-0 overflow-hidden">
|
||||
<DialogHeader className="pb-4 shrink-0">
|
||||
<DialogTitle>{t("Edit Note")}</DialogTitle>
|
||||
</DialogHeader>
|
||||
<div className="flex-1 min-h-0 overflow-y-auto -mx-6 px-6">
|
||||
<NoteForm
|
||||
defaultValues={{
|
||||
title: note.title,
|
||||
title: note.title ?? undefined,
|
||||
content: note.content,
|
||||
is_pinned: note.is_pinned,
|
||||
color: note.color,
|
||||
@@ -189,7 +189,7 @@ export function NoteCard({ note }: NoteCardProps) {
|
||||
open={historyOpen}
|
||||
onOpenChange={setHistoryOpen}
|
||||
noteId={note.id}
|
||||
noteTitle={note.title}
|
||||
noteTitle={note.title ?? ""}
|
||||
/>
|
||||
|
||||
<NoteViewDialog
|
||||
|
||||
Reference in New Issue
Block a user