diff --git a/client/components/document/index.tsx b/client/components/document/index.tsx index 9edb414..ece89ec 100644 --- a/client/components/document/index.tsx +++ b/client/components/document/index.tsx @@ -10,9 +10,10 @@ type Props = { content?: string setTitle?: (title: string) => void setContent?: (content: string) => void + initialTab?: "edit" | "preview" } -const Document = ({ remove, editable, title, content, setTitle, setContent }: Props) => { +const Document = ({ remove, editable, title, content, setTitle, setContent, initialTab = 'edit' }: Props) => { const codeEditorRef = useRef(null) const removeFile = (remove?: () => void) => { @@ -45,7 +46,7 @@ const Document = ({ remove, editable, title, content, setTitle, setContent }: Pr {remove && editable &&