diff --git a/app/client/components/BookChapterForm.tsx b/app/client/components/BookChapterForm.tsx index e8890e8..c3934ca 100644 --- a/app/client/components/BookChapterForm.tsx +++ b/app/client/components/BookChapterForm.tsx @@ -38,7 +38,14 @@ export function BookChapterForm({ readonly initialValues?: BookChapterEditInitialValues | null; readonly onChapterSubmit: (chapter: BookChapterInput) => Promise; }) { - const [content, setContent] = useState([]); + const [content, setContent] = useState( + initialValues?.content ?? [ + { + type: 'paragraph', + children: [{ text: '' }] + } + ] + ); const schema = v.pipe( v.object({