Feat/land page (#391)

* feat: update landing page

* feat: update landing page

* fix: react warning

* feat(route): rename variables

* feat(route): better refresh

* fix: update logo and i18n

* feat(code): remove unused comment

* refactor(workspace): rename workspaceId

* refactor(page): rename pageId

* feat(edit): more robust editing experience

* fix: landing page mobile

* fix: landing page mobile

Co-authored-by: tzhangchi <terry.zhangchi@outlook.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
This commit is contained in:
zuomeng wang
2022-09-09 10:56:10 +08:00
committed by GitHub
parent bd2668335c
commit b35c9b2c14
35 changed files with 374 additions and 145 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ const _currentEditors = atom<EditorsMap>({} as EditorsMap);
/** hook for using editors outside page */
export const useCurrentEditors = () => {
const { workspace_id: workspaceId, page_id: pageId } = useParams();
const { workspaceId, pageId } = useParams();
const { pathname } = useLocation();
const [currentEditors, setCurrentEditors] = useAtom(_currentEditors);
-5
View File
@@ -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);
}
}, []);