Implement onboarding completion UX: refresh profile, correct achievement name, hide prompts, add success toast and badge

cgen-3ee432f0eeb24eeca50fb3ba495a8bc5
This commit is contained in:
Builder.io 2025-09-28 04:23:41 +00:00
parent d7f0eeec71
commit 073a7d7c7e

View file

@ -26,6 +26,7 @@ interface AuthContextType {
signInWithOAuth: (provider: "github" | "google") => Promise<void>;
signOut: () => Promise<void>;
updateProfile: (updates: Partial<AethexUserProfile>) => Promise<void>;
refreshProfile: () => Promise<void>;
}
const AuthContext = createContext<AuthContextType | undefined>(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 <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;