diff --git a/src/app/(posts)/new/components/edit-document-list/edit-document/index.tsx b/src/app/(posts)/new/components/edit-document-list/edit-document/index.tsx index bae77b75..8905abfe 100644 --- a/src/app/(posts)/new/components/edit-document-list/edit-document/index.tsx +++ b/src/app/(posts)/new/components/edit-document-list/edit-document/index.tsx @@ -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} + diff --git a/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx b/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx index d25be19b..33e9f220 100644 --- a/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx +++ b/src/app/(posts)/post/[id]/components/post-files/view-document/index.tsx @@ -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}