mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-22 03:33:06 +08:00
refactor: remove NoSsr on top level (#1951)
This commit is contained in:
@@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user