mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
fix(core): fix error when switch to local workspace (#6144)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { style } from '@vanilla-extract/css';
|
import { style } from '@vanilla-extract/css';
|
||||||
export const fallbackStyle = style({
|
export const fallbackStyle = style({
|
||||||
margin: '12px 16px',
|
margin: '5px 16px',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
});
|
});
|
||||||
export const fallbackHeaderStyle = style({
|
export const fallbackHeaderStyle = style({
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { events } from '@affine/electron-api';
|
import { events } from '@affine/electron-api';
|
||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
import { useLiveData, useService, WorkspaceManager } from '@toeverything/infra';
|
import {
|
||||||
|
useLiveData,
|
||||||
|
useService,
|
||||||
|
Workspace,
|
||||||
|
WorkspaceManager,
|
||||||
|
} from '@toeverything/infra';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import type { ReactElement } from 'react';
|
import type { ReactElement } from 'react';
|
||||||
import { lazy, Suspense, useCallback, useEffect } from 'react';
|
import { lazy, Suspense, useCallback, useEffect } from 'react';
|
||||||
@@ -184,9 +189,7 @@ export const AuthModal = (): ReactElement => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function CurrentWorkspaceModals() {
|
export function CurrentWorkspaceModals() {
|
||||||
const currentWorkspace = useLiveData(
|
const currentWorkspace = useService(Workspace);
|
||||||
useService(CurrentWorkspaceService).currentWorkspace$
|
|
||||||
);
|
|
||||||
const [openDisableCloudAlertModal, setOpenDisableCloudAlertModal] = useAtom(
|
const [openDisableCloudAlertModal, setOpenDisableCloudAlertModal] = useAtom(
|
||||||
openDisableCloudAlertModalAtom
|
openDisableCloudAlertModalAtom
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user