Update Onboarding to refresh profile and toast; Update Dashboard to hide setup banner when onboarding complete and show badge
cgen-e6f9ffe019da42458b89b9a63801bc02
This commit is contained in:
parent
c7aab36dc9
commit
a6e4293f25
1 changed files with 11 additions and 2 deletions
|
|
@ -62,7 +62,7 @@ export default function Onboarding() {
|
|||
const [isTransitioning, setIsTransitioning] = useState(false);
|
||||
const [isFinishing, setIsFinishing] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
const { user } = useAuth();
|
||||
const { user, refreshProfile } = useAuth();
|
||||
|
||||
const steps = [
|
||||
{ title: "Choose Your Path", component: UserTypeSelection },
|
||||
|
|
@ -163,7 +163,16 @@ export default function Onboarding() {
|
|||
aethexAchievementService.checkAndAwardOnboardingAchievement(user.id),
|
||||
]).catch(() => undefined);
|
||||
|
||||
// Navigate immediately after profile success
|
||||
// Refresh profile so UI updates immediately
|
||||
await refreshProfile();
|
||||
|
||||
// Success toast
|
||||
aethexToast.success({
|
||||
title: "You're all set!",
|
||||
description: "Profile setup complete. Welcome to your dashboard.",
|
||||
});
|
||||
|
||||
// Navigate after success
|
||||
navigate("/dashboard", { replace: true });
|
||||
} catch (e) {
|
||||
function formatError(err: any) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue