fix: infinite loading when no workspaces (#1679)

This commit is contained in:
Himself65
2023-03-23 22:46:17 -05:00
committed by GitHub
parent 9eec8d0f1e
commit 3e299b97c3
6 changed files with 27 additions and 6 deletions

View File

@@ -67,6 +67,10 @@ const App = function App({
>
<Head>
<title>AFFiNE</title>
<meta
name="viewport"
content="initial-scale=1, width=device-width"
/>
</Head>
{getLayout(<Component {...pageProps} />)}
</ProviderComposer>

View File

@@ -51,7 +51,6 @@ export default class AppDocument extends Document<{
/>
<link rel="icon" sizes="192x192" href="/chrome-192x192.png" />
<meta name="emotion-insertion-point" content="" />
<meta name="viewport" content="initial-scale=1, width=device-width" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:url" content="https://app.affine.pro/" />
<meta

View File

@@ -49,10 +49,13 @@ const IndexPageInner = () => {
dispose.dispose();
};
}
} else {
// fixme: should create new workspace
jumpToSubPath('ERROR', WorkspaceSubPath.ALL, RouteLogic.REPLACE);
}
}, [jumpToPage, jumpToSubPath, lastWorkspaceId, router, workspaces]);
return <PageLoading />;
return <PageLoading key="IndexPageInfinitePageLoading" />;
};
const IndexPage: NextPage = () => {