Refine Dashboard loading/render conditions to avoid persistent overlay
cgen-486add7947fb4118a8f67dc0e739f1f7
This commit is contained in:
parent
d9d1e1ae44
commit
9fb5ec70f4
1 changed files with 8 additions and 3 deletions
|
|
@ -154,13 +154,18 @@ export default function Dashboard() {
|
|||
}
|
||||
};
|
||||
|
||||
// While auth is resolving or data is loading, show loading screen
|
||||
if (authLoading || isLoading || !user) {
|
||||
// If no user and auth is resolved, let the redirect happen without flashing a loader
|
||||
if (!user && !authLoading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Show loading only while auth or data is loading
|
||||
if (authLoading || isLoading) {
|
||||
return (
|
||||
<LoadingScreen
|
||||
message="Loading your dashboard..."
|
||||
showProgress={true}
|
||||
duration={1500}
|
||||
duration={1200}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue