From 073a7d7c7e60a9d07606d3e2c0de4fe9af9f4788 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 28 Sep 2025 04:23:41 +0000 Subject: [PATCH] Implement onboarding completion UX: refresh profile, correct achievement name, hide prompts, add success toast and badge cgen-3ee432f0eeb24eeca50fb3ba495a8bc5 --- client/contexts/AuthContext.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx index b3db4329..1a389b94 100644 --- a/client/contexts/AuthContext.tsx +++ b/client/contexts/AuthContext.tsx @@ -26,6 +26,7 @@ interface AuthContextType { signInWithOAuth: (provider: "github" | "google") => Promise; signOut: () => Promise; updateProfile: (updates: Partial) => Promise; + refreshProfile: () => Promise; } const AuthContext = createContext(undefined); @@ -259,6 +260,10 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ } }; + const refreshProfile = async () => { + if (user?.id) await fetchUserProfile(user.id); + }; + const value = { user, profile, @@ -271,6 +276,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ signInWithOAuth, signOut, updateProfile, + refreshProfile, }; return {children};