feat: add preloading template

This commit is contained in:
Flrande
2023-06-07 17:31:54 +08:00
committed by Alex Yang
parent ee6860ed39
commit 2352aa8c50
67 changed files with 6732 additions and 385 deletions
+2 -8
View File
@@ -1,5 +1,4 @@
import { AppContainer, MainContainer } from '@affine/component/workspace';
import { initPage } from '@affine/env/blocksuite';
import { useRouter } from 'next/router';
import { lazy, Suspense } from 'react';
@@ -16,17 +15,12 @@ const InitPagePage: NextPageWithLayout = () => {
if (!router.isReady) {
return <>loading...</>;
}
let testType: 'empty' | 'importMarkdown' = 'empty';
if (router.query.type === 'importMarkdown') {
testType = 'importMarkdown';
} else if (router.query.type === 'empty') {
testType = 'empty';
}
return (
<AppContainer>
<MainContainer>
<Suspense>
<Editor onInit={initPage} testType={testType} />
<Editor />
</Suspense>
<div id="toolWrapper" />
</MainContainer>