From 6db390e6099e8c8b18d0c134b0ad5325ea735bf3 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Mon, 10 Nov 2025 01:23:24 +0000 Subject: [PATCH] Add proper handling for not-logged-in state - show message instead of empty return cgen-312d2c01ef834a42a4bbc77570ddff23 --- client/pages/Dashboard.tsx | 47 +++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/client/pages/Dashboard.tsx b/client/pages/Dashboard.tsx index a40da365..9fee906b 100644 --- a/client/pages/Dashboard.tsx +++ b/client/pages/Dashboard.tsx @@ -563,12 +563,7 @@ export default function Dashboard() { } }; - // 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 + // Show loading while auth is resolving if (authLoading || isLoading) { return ( +
+

Welcome to AeThex

+

+ You need to be signed in to access the dashboard +

+ +
+ + ); + } + + // If user but no profile, show incomplete profile message + if (!profile) { + return ( +
+
+

Complete Your Profile

+

+ Let's set up your profile to get started with AeThex +

+ +
+
+ ); + } + // Hide setup banner once onboarding is complete const showProfileSetup = !profileComplete;