mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
refactor(editor): reduce dependency to doc collection (#9492)
This commit is contained in:
@@ -28,6 +28,7 @@ import {
|
||||
useParams,
|
||||
useSearchParams,
|
||||
} from 'react-router-dom';
|
||||
import * as _Y from 'yjs';
|
||||
|
||||
import { AffineErrorBoundary } from '../../../components/affine/affine-error-boundary';
|
||||
import { WorkbenchRoot } from '../../../modules/workbench';
|
||||
@@ -46,11 +47,15 @@ declare global {
|
||||
var exportWorkspaceSnapshot: (docs?: string[]) => Promise<void>;
|
||||
// oxlint-disable-next-line no-var
|
||||
var importWorkspaceSnapshot: () => Promise<void>;
|
||||
// oxlint-disable-next-line no-var
|
||||
var Y: typeof _Y;
|
||||
interface WindowEventMap {
|
||||
'affine:workspace:change': CustomEvent<{ id: string }>;
|
||||
}
|
||||
}
|
||||
|
||||
globalThis.Y = _Y;
|
||||
|
||||
export const Component = (): ReactElement => {
|
||||
const {
|
||||
workspacesService,
|
||||
|
||||
Reference in New Issue
Block a user