Fix post creation/text input
This commit is contained in:
parent
98cbbf2347
commit
b5b4bf08f6
2 changed files with 6 additions and 5 deletions
|
@ -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>
|
||||
</>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue