From d9d1e1ae440f59141cbd0fe30b46bb2648978dec Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 27 Sep 2025 20:45:16 +0000 Subject: [PATCH] Guard render against premature redirect; show nothing only when redirecting condition met cgen-0f1c083ad7784113b586659a13c98789 --- client/pages/Dashboard.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/client/pages/Dashboard.tsx b/client/pages/Dashboard.tsx index 8d586670..86f99a7b 100644 --- a/client/pages/Dashboard.tsx +++ b/client/pages/Dashboard.tsx @@ -154,13 +154,8 @@ export default function Dashboard() { } }; - // Don't show loading screen if no user - just redirect - if (!user) { - return null; - } - - // Show loading only if we have a user but are still loading data - if (authLoading || isLoading) { + // While auth is resolving or data is loading, show loading screen + if (authLoading || isLoading || !user) { return (