refactor: remove NoSsr on top level (#1951)

This commit is contained in:
Himself65
2023-04-14 17:07:41 -05:00
committed by GitHub
parent 43a96fe8e3
commit 2383165470
27 changed files with 211 additions and 133 deletions
+11 -2
View File
@@ -1,5 +1,14 @@
import { getEnvironment } from '@affine/env';
import type { EditorContainer } from '@blocksuite/editor';
import { atom } from 'jotai';
export const lottieAtom = atom(async () =>
import('lottie-web').then(m => m.default)
export const lottieAtom = atom(import('lottie-web').then(m => m.default));
export const editorContainerModuleAtom = atom<Promise<typeof EditorContainer>>(
getEnvironment().isServer
? async () =>
import('@blocksuite/editor').then(module => module.EditorContainer)
: (import('@blocksuite/editor').then(
module => module.EditorContainer
) as any)
);