diff --git a/packages/frontend/core/src/pages/index.tsx b/packages/frontend/core/src/pages/index.tsx index e2152f46c1..10637ab939 100644 --- a/packages/frontend/core/src/pages/index.tsx +++ b/packages/frontend/core/src/pages/index.tsx @@ -1,9 +1,6 @@ import { Menu } from '@affine/component/ui/menu'; import { WorkspaceFallback } from '@affine/component/workspace'; -import { - workspaceListAtom, - workspaceListLoadingStatusAtom, -} from '@affine/core/modules/workspace'; +import { workspaceListAtom } from '@affine/core/modules/workspace'; import { WorkspaceSubPath } from '@affine/core/shared'; import { useAtomValue } from 'jotai'; import { lazy, useEffect, useLayoutEffect, useState } from 'react'; @@ -33,12 +30,11 @@ export const Component = () => { const [creating, setCreating] = useState(false); const list = useAtomValue(workspaceListAtom); - const listLoading = useAtomValue(workspaceListLoadingStatusAtom); const { openPage } = useNavigateHelper(); useLayoutEffect(() => { - if (list.length === 0 || listLoading) { + if (list.length === 0) { return; } @@ -47,7 +43,7 @@ export const Component = () => { const openWorkspace = list.find(w => w.id === lastId) ?? list[0]; openPage(openWorkspace.id, WorkspaceSubPath.ALL); setNavigating(true); - }, [list, listLoading, openPage]); + }, [list, openPage]); useEffect(() => { setCreating(true); diff --git a/packages/frontend/core/src/providers/modal-provider.tsx b/packages/frontend/core/src/providers/modal-provider.tsx index 6385a6f9b2..75e896558a 100644 --- a/packages/frontend/core/src/providers/modal-provider.tsx +++ b/packages/frontend/core/src/providers/modal-provider.tsx @@ -202,7 +202,9 @@ export const SignOutConfirmModal = () => { const onConfirm = useAsyncCallback(async () => { setOpen(false); - await signOutCloud(); + await signOutCloud({ + redirect: false, + }); // if current workspace is affine cloud, switch to local workspace if (currentWorkspace?.flavour === WorkspaceFlavour.AFFINE_CLOUD) {