work on editor
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
import { useParams } from 'react-router-dom';
|
||||
import Editor from '@/features/editor/editor';
|
||||
import React, { Suspense } from 'react';
|
||||
|
||||
const Editor = React.lazy(() => import('@/features/editor/editor'));
|
||||
|
||||
export default function Page() {
|
||||
const { pageId } = useParams();
|
||||
|
||||
return <Editor key={pageId} pageId={pageId} />;
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Editor key={pageId} pageId={pageId} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user