Update signUp method to use AeThex adapter

cgen-ad1f6414702145be9e6f2e473a8b58f7
This commit is contained in:
Builder.io 2025-08-06 00:30:17 +00:00
parent 74a8b67cae
commit d40d3e2a62

View file

@ -132,7 +132,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
}
};
const signUp = async (email: string, password: string, userData?: Partial<UserProfile>) => {
const signUp = async (email: string, password: string, userData?: Partial<AethexUserProfile>) => {
if (!isSupabaseConfigured) {
aethexToast.warning({
title: 'Demo Mode',
@ -150,15 +150,11 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
if (error) throw error;
if (data.user && userData) {
// Create user profile after successful signup
const { error: profileError } = await supabase
.from('user_profiles')
.insert({
id: data.user.id,
...userData,
});
if (profileError) throw profileError;
// Create user profile using AeThex adapter
await aethexUserService.createInitialProfile(data.user.id, {
...userData,
email,
});
aethexToast.success({
title: 'Account created!',