Update signUp method to use AeThex adapter
cgen-ad1f6414702145be9e6f2e473a8b58f7
This commit is contained in:
parent
74a8b67cae
commit
d40d3e2a62
1 changed files with 6 additions and 10 deletions
|
|
@ -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!',
|
||||
|
|
|
|||
Loading…
Reference in a new issue