Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): fix error when switch to local workspace (#6144)

EYHNda12a0e48e72
diff --git a/packages/frontend/core/src/components/app-sidebar/fallback.css.ts b/packages/frontend/core/src/components/app-sidebar/fallback.css.ts
index f353efce4d..1250b8b585 100644
--- a/packages/frontend/core/src/components/app-sidebar/fallback.css.ts
+++ b/packages/frontend/core/src/components/app-sidebar/fallback.css.ts
@@ -1,6 +1,6 @@
import { style } from '@vanilla-extract/css';
export const fallbackStyle = style({
- margin: '12px 16px',
+ margin: '5px 16px',
height: '100%',
});
export const fallbackHeaderStyle = style({
diff --git a/packages/frontend/core/src/providers/modal-provider.tsx b/packages/frontend/core/src/providers/modal-provider.tsx
index 7e6630d833..871cbcf41e 100644
--- a/packages/frontend/core/src/providers/modal-provider.tsx
+++ b/packages/frontend/core/src/providers/modal-provider.tsx
@@ -1,6 +1,11 @@
import { events } from '@affine/electron-api';
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 type { ReactElement } from 'react';
import { lazy, Suspense, useCallback, useEffect } from 'react';
@@ -184,9 +189,7 @@ export const AuthModal = (): ReactElement => {
};
export function CurrentWorkspaceModals() {
- const currentWorkspace = useLiveData(
- useService(CurrentWorkspaceService).currentWorkspace$
- );
+ const currentWorkspace = useService(Workspace);
const [openDisableCloudAlertModal, setOpenDisableCloudAlertModal] = useAtom(
openDisableCloudAlertModalAtom
);