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.

feat(route): better refresh

tzhangchi5b7e1a06baef
diff --git a/apps/ligo-virgo/src/pages/workspace/WorkspaceContainer.tsx b/apps/ligo-virgo/src/pages/workspace/WorkspaceContainer.tsx
index eb424f88c7..5ebc753516 100644
--- a/apps/ligo-virgo/src/pages/workspace/WorkspaceContainer.tsx
+++ b/apps/ligo-virgo/src/pages/workspace/WorkspaceContainer.tsx
@@ -9,7 +9,6 @@ import Pages from './pages';
export function WorkspaceContainer() {
const { workspace_id } = useParams();
const { user, currentSpaceId } = useUserAndSpaces();
-
if (
user &&
![currentSpaceId, 'affine2vin277tcmafwq'].includes(workspace_id)
diff --git a/libs/datasource/state/src/user.ts b/libs/datasource/state/src/user.ts
index 063f9f7f04..40ffbd80d9 100644
--- a/libs/datasource/state/src/user.ts
+++ b/libs/datasource/state/src/user.ts
@@ -5,7 +5,6 @@ import {
} from 'firebase/auth';
import { atom, useAtom } from 'jotai';
import { useEffect, useMemo } from 'react';
-import { useLocation, useNavigate } from 'react-router';
import { useIdentifyUser } from '@toeverything/datasource/feature-flags';
import { UserInfo } from '@toeverything/utils';
@@ -63,15 +62,11 @@ const BRAND_ID = 'AFFiNE';
const _localTrigger = atom<boolean>(false);
const _useUserAndSpacesForFreeLogin = () => {
- const location = useLocation();
- const navigate = useNavigate();
const [user, setUser] = useAtom(_userAtom);
const [loading, setLoading] = useAtom(_loadingAtom);
- const [localTrigger] = useAtom(_localTrigger);
useEffect(() => {
if (loading) {
- navigate(`/${BRAND_ID}`);
setLoading(false);
}
}, []);