From d882260575c91924fdc3fba828dfc015b5acaec1 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Fri, 8 Aug 2025 10:16:25 +0000 Subject: [PATCH] Fix loading state when redirecting unauthenticated users cgen-517c2edf6285418898f00795ccca7b7d --- client/pages/Dashboard.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/pages/Dashboard.tsx b/client/pages/Dashboard.tsx index bfcfd241..f141e7b5 100644 --- a/client/pages/Dashboard.tsx +++ b/client/pages/Dashboard.tsx @@ -56,12 +56,15 @@ export default function Dashboard() { useEffect(() => { if (!authLoading && !user) { + setIsLoading(false); navigate("/login"); return; } if (user && profile) { loadDashboardData(); + } else if (!authLoading) { + setIsLoading(false); } }, [user, profile, authLoading, navigate]);