mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor: remove next/dynamic (#1901)
This commit is contained in:
@@ -2,8 +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 dynamic from 'next/dynamic';
|
||||
import { useState } from 'react';
|
||||
import { lazy, useState } from 'react';
|
||||
|
||||
import { ShortcutsModal } from '../shortcuts-modal';
|
||||
import { ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
|
||||
@@ -13,14 +12,11 @@ import {
|
||||
StyledIsland,
|
||||
StyledTriggerWrapper,
|
||||
} from './style';
|
||||
const ContactModal = dynamic(
|
||||
() =>
|
||||
import('@affine/component/contact-modal').then(({ ContactModal }) => ({
|
||||
default: ContactModal,
|
||||
})),
|
||||
{
|
||||
ssr: true,
|
||||
}
|
||||
|
||||
const ContactModal = lazy(() =>
|
||||
import('@affine/component/contact-modal').then(({ ContactModal }) => ({
|
||||
default: ContactModal,
|
||||
}))
|
||||
);
|
||||
|
||||
export type IslandItemNames = 'whatNew' | 'contact' | 'shortcuts';
|
||||
|
||||
Reference in New Issue
Block a user