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,
|
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>
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue