mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
feat: add preloading template (#2655)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user