mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix: wrap React.lazy with Suspense (#1915)
This commit is contained in:
@@ -2,7 +2,7 @@ import { MuiFade, Tooltip } from '@affine/component';
|
||||
import { config } from '@affine/env';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { CloseIcon, NewIcon } from '@blocksuite/icons';
|
||||
import { lazy, useState } from 'react';
|
||||
import { lazy, Suspense, useState } from 'react';
|
||||
|
||||
import { ShortcutsModal } from '../shortcuts-modal';
|
||||
import { ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
|
||||
@@ -113,11 +113,13 @@ export const HelpIsland = ({
|
||||
</StyledTriggerWrapper>
|
||||
</MuiFade>
|
||||
</StyledIsland>
|
||||
<ContactModal
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
logoSrc="/imgs/affine-text-logo.png"
|
||||
/>
|
||||
<Suspense>
|
||||
<ContactModal
|
||||
open={open}
|
||||
onClose={() => setOpen(false)}
|
||||
logoSrc="/imgs/affine-text-logo.png"
|
||||
/>
|
||||
</Suspense>
|
||||
<ShortcutsModal
|
||||
open={openShortCut}
|
||||
onClose={() => setOpenShortCut(false)}
|
||||
|
||||
Reference in New Issue
Block a user