Fix post creation/text input

This commit is contained in:
Max Leiter 2023-01-29 00:31:24 -08:00
parent 98cbbf2347
commit b5b4bf08f6
2 changed files with 6 additions and 5 deletions

View file

@ -19,7 +19,7 @@ function Document({
onPaste, onPaste,
remove, remove,
title, title,
content, content = "",
setTitle, setTitle,
defaultTab = "edit", defaultTab = "edit",
handleOnContentChange handleOnContentChange
@ -88,8 +88,9 @@ function Document({
// @ts-expect-error Type 'HTMLDivElement' is missing the following properties from type 'HTMLTextAreaElement': autocomplete, cols, defaultValue, dirName, and 26 more // @ts-expect-error Type 'HTMLDivElement' is missing the following properties from type 'HTMLTextAreaElement': autocomplete, cols, defaultValue, dirName, and 26 more
onPaste={onPaste} onPaste={onPaste}
title={title} title={title}
content={content} >
/> {content}
</DocumentTabs>
</div> </div>
</div> </div>
</> </>

View file

@ -78,7 +78,7 @@ const Document = ({ skeleton, ...props }: Props) => {
) )
} }
const { title, initialTab, id, content, preview } = props const { title, initialTab, id, content = "", preview } = props
// if the query has our title, we can use it to scroll to the file. // if the query has our title, we can use it to scroll to the file.
// we can't use the browsers implementation because the data isn't loaded yet // we can't use the browsers implementation because the data isn't loaded yet
@ -115,7 +115,7 @@ const Document = ({ skeleton, ...props }: Props) => {
staticPreview={preview} staticPreview={preview}
isEditing={false} isEditing={false}
> >
{content || ""} {content}
</DocumentTabs> </DocumentTabs>
</div> </div>
</div> </div>