perf: getEnvironment() -> env (#2636)

This commit is contained in:
Simon He
2023-06-01 11:23:38 +08:00
committed by himself65
parent 9c6916426e
commit 45f831a73c
16 changed files with 70 additions and 86 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
import { getEnvironment } from '@affine/env';
import { env } from '@affine/env';
import type { EditorContainer } from '@blocksuite/editor';
import { atom } from 'jotai';
export const lottieAtom = atom(import('lottie-web').then(m => m.default));
export const editorContainerModuleAtom = atom<Promise<typeof EditorContainer>>(
getEnvironment().isServer
env.isServer
? async () =>
import('@blocksuite/editor').then(module => module.EditorContainer)
: (import('@blocksuite/editor').then(