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,
remove,
title,
content,
content = "",
setTitle,
defaultTab = "edit",
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
onPaste={onPaste}
title={title}
content={content}
/>
>
{content}
</DocumentTabs>
</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.
// 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}
isEditing={false}
>
{content || ""}
{content}
</DocumentTabs>
</div>
</div>