mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: use Next.js 13 App directory
This commit is contained in:
parent
cb3fc9a488
commit
379a0e9859
28 changed files with 418 additions and 295 deletions
|
|
@ -10,7 +10,7 @@ interface EditorWrapperProps {
|
|||
course:any
|
||||
}
|
||||
|
||||
function EditorWrapper(props: EditorWrapperProps) {
|
||||
function EditorWrapper(props: EditorWrapperProps) : JSX.Element {
|
||||
// A new Y document
|
||||
const ydoc = new Y.Doc();
|
||||
const [providerState, setProviderState] = React.useState<any>({});
|
||||
|
|
@ -33,6 +33,7 @@ function EditorWrapper(props: EditorWrapperProps) {
|
|||
|
||||
if (isLoading) {
|
||||
createRTCProvider();
|
||||
return <div>Loading...</div>;
|
||||
} else {
|
||||
return <Editor course={props.course} element={props.element} content={props.content} setContent={setContent} provider={providerState} ydoc={ydocState}></Editor>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue