refactor: remove next/dynamic (#1901)

This commit is contained in:
Himself65 authored and GitHub committed 2023-04-12 11:08:50 -05:00
1 parent d9c4fc3a9e
commit 8bcef957fc
8 files changed
+43 -52

No files matched your search

@@ -1,11 +1,10 @@
import { ListSkeleton } from '@affine/component';
import { useAtomValue } from 'jotai';
import { useAtom } from 'jotai';
import dynamic from 'next/dynamic';
import Head from 'next/head';
import { useRouter } from 'next/router';
import type React from 'react';
import { Suspense } from 'react';
import { lazy, Suspense } from 'react';
import { openQuickSearchModalAtom } from '../atoms';
import {
@@ -16,8 +15,10 @@ import { StyledTableContainer } from '../components/blocksuite/block-suite-page-
import { useRouterTitle } from '../hooks/use-router-title';
import { MainContainer, StyledPage } from './styles';
const QuickSearchModal = dynamic(
() => import('../components/pure/quick-search-modal')
const QuickSearchModal = lazy(() =>
import('../components/pure/quick-search-modal').then(module => ({
default: module.QuickSearchModal,
}))
);
export const PublicQuickSearch: React.FC = () => {