mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(workspace): check affine login auth (#2070)
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { WorkspaceFlavour } from '@affine/workspace/type';
|
||||
import type { NextPage } from 'next';
|
||||
import { useRouter } from 'next/router';
|
||||
import { Suspense, useEffect } from 'react';
|
||||
@@ -27,10 +26,7 @@ const IndexPageInner = () => {
|
||||
const targetWorkspace =
|
||||
(lastWorkspaceId &&
|
||||
workspaces.find(({ id }) => id === lastWorkspaceId)) ||
|
||||
// fixme(himself65):
|
||||
// when affine workspace is expired and the first workspace is affine,
|
||||
// the page will crash
|
||||
workspaces.find(({ flavour }) => flavour === WorkspaceFlavour.LOCAL);
|
||||
workspaces.at(0);
|
||||
|
||||
if (targetWorkspace) {
|
||||
const pageId =
|
||||
|
||||
Reference in New Issue
Block a user