refactor: remove next/dynamic (#1901)

This commit is contained in:
Himself65
2023-04-12 11:08:50 -05:00
committed by GitHub
parent d9c4fc3a9e
commit 8bcef957fc
8 changed files with 43 additions and 52 deletions

View File

@@ -11,14 +11,12 @@ import {
} from '@affine/workspace/affine/login';
import { useAtom } from 'jotai';
import type { NextPage } from 'next';
import dynamic from 'next/dynamic';
import { useMemo } from 'react';
import { lazy, useMemo } from 'react';
import { toast } from '../../utils';
const Viewer = dynamic(
() => import('@rich-data/viewer').then(m => ({ default: m.JsonViewer })),
{ ssr: false }
const Viewer = lazy(() =>
import('@rich-data/viewer').then(m => ({ default: m.JsonViewer }))
);
import { useTheme } from 'next-themes';