mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 22:38:56 +08:00
fix: clear any
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
|||||||
PageMeta,
|
PageMeta,
|
||||||
} from './interface';
|
} from './interface';
|
||||||
import { createDefaultWorkspace } from './utils';
|
import { createDefaultWorkspace } from './utils';
|
||||||
|
import { Workspace } from '@blocksuite/store';
|
||||||
|
import { WorkspaceInfo } from '@affine/datacenter/dist/src/types';
|
||||||
|
|
||||||
type AppStateContextProps = PropsWithChildren<Record<string, unknown>>;
|
type AppStateContextProps = PropsWithChildren<Record<string, unknown>>;
|
||||||
|
|
||||||
@@ -105,9 +107,11 @@ export const AppStateProvider = ({
|
|||||||
return currentWorkspace;
|
return currentWorkspace;
|
||||||
}
|
}
|
||||||
const workspace = await dataCenter.loadWorkspace(workspaceId);
|
const workspace = await dataCenter.loadWorkspace(workspaceId);
|
||||||
const currentMetaWorkSpace = dataCenter.workspaces.find(item => {
|
const currentMetaWorkSpace = dataCenter.workspaces.find(
|
||||||
return item.id === workspace.room;
|
(item: WorkspaceInfo) => {
|
||||||
});
|
return item.id === workspace.room;
|
||||||
|
}
|
||||||
|
);
|
||||||
setAppState({
|
setAppState({
|
||||||
...appState,
|
...appState,
|
||||||
currentWorkspace: workspace,
|
currentWorkspace: workspace,
|
||||||
|
|||||||
Reference in New Issue
Block a user