From 9fb5ec70f46912a771850972f2fe51a327e10f86 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 27 Sep 2025 20:47:55 +0000 Subject: [PATCH] Refine Dashboard loading/render conditions to avoid persistent overlay cgen-486add7947fb4118a8f67dc0e739f1f7 --- client/pages/Dashboard.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/pages/Dashboard.tsx b/client/pages/Dashboard.tsx index 86f99a7b..d0a2d768 100644 --- a/client/pages/Dashboard.tsx +++ b/client/pages/Dashboard.tsx @@ -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 ( ); }