mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-28 17:22:30 +03:00
fix: move suspense to the correct place (#1954)
This commit is contained in:
parent
b771a2504b
commit
43a96fe8e3
@ -1,4 +1,3 @@
|
||||
import { ListSkeleton } from '@affine/component';
|
||||
import type { AffinePublicWorkspace } from '@affine/workspace/type';
|
||||
import { useAtom } from 'jotai';
|
||||
import Head from 'next/head';
|
||||
@ -7,7 +6,6 @@ import type React from 'react';
|
||||
import { lazy, Suspense } from 'react';
|
||||
|
||||
import { openQuickSearchModalAtom } from '../atoms';
|
||||
import { StyledTableContainer } from '../components/blocksuite/block-suite-page-list/page-list/styles';
|
||||
import { useRouterTitle } from '../hooks/use-router-title';
|
||||
import { MainContainer, StyledPage } from './styles';
|
||||
|
||||
@ -61,14 +59,6 @@ export const PublicWorkspaceLayout: React.FC<
|
||||
React.PropsWithChildren
|
||||
> = props => {
|
||||
return (
|
||||
<Suspense
|
||||
fallback={
|
||||
<StyledTableContainer>
|
||||
<ListSkeleton />
|
||||
</StyledTableContainer>
|
||||
}
|
||||
>
|
||||
<PublicWorkspaceLayoutInner>{props.children}</PublicWorkspaceLayoutInner>
|
||||
</Suspense>
|
||||
<PublicWorkspaceLayoutInner>{props.children}</PublicWorkspaceLayoutInner>
|
||||
);
|
||||
};
|
||||
|
@ -75,7 +75,13 @@ const ListPageInner: React.FC<{
|
||||
<SearchIcon />
|
||||
</IconButton>
|
||||
</NavContainer>
|
||||
<Suspense>
|
||||
<Suspense
|
||||
fallback={
|
||||
<StyledTableContainer>
|
||||
<ListSkeleton />
|
||||
</StyledTableContainer>
|
||||
}
|
||||
>
|
||||
<BlockSuitePublicPageList
|
||||
onOpenPage={handleClickPage}
|
||||
blockSuiteWorkspace={blockSuiteWorkspace}
|
||||
|
Loading…
Reference in New Issue
Block a user