mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-20 19:42:04 +08:00
feat(component): improve fallback skeleton (#2323)
This commit is contained in:
@@ -84,9 +84,7 @@ function AuthContext({ children }: PropsWithChildren): ReactElement {
|
||||
}
|
||||
}, [login]);
|
||||
if (!login) {
|
||||
return (
|
||||
<PageLoading text="No login, redirecting to local workspace page..." />
|
||||
);
|
||||
return <PageLoading />;
|
||||
}
|
||||
return <>{children}</>;
|
||||
}
|
||||
@@ -278,7 +276,7 @@ export const AffinePlugin: WorkspacePlugin<WorkspaceFlavour.AFFINE> = {
|
||||
UI: {
|
||||
Provider: ({ children }) => {
|
||||
return (
|
||||
<Suspense fallback={<PageLoading text="Checking login status..." />}>
|
||||
<Suspense fallback={<PageLoading />}>
|
||||
<AuthContext>{children}</AuthContext>
|
||||
</Suspense>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user