From 74a8b67cae838bc31c78ef501b6dce103d01106f Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Wed, 6 Aug 2025 00:30:06 +0000 Subject: [PATCH] Update fetchUserProfile to use AeThex adapter cgen-ea71a38f54944c0c97055d8338998e97 --- client/contexts/AuthContext.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/client/contexts/AuthContext.tsx b/client/contexts/AuthContext.tsx index 5c51fa13..e8895c52 100644 --- a/client/contexts/AuthContext.tsx +++ b/client/contexts/AuthContext.tsx @@ -90,22 +90,13 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children // Initialize demo data and get profile DemoStorageService.initializeDemoData(); const demoProfile = DemoStorageService.getUserProfile(); - setProfile(demoProfile); + setProfile(demoProfile as AethexUserProfile); return; } try { - const { data, error } = await supabase - .from('user_profiles') - .select('*') - .eq('id', userId) - .single(); - - if (error && error.code !== 'PGRST116') { - throw error; - } - - setProfile(data); + const userProfile = await aethexUserService.getCurrentUser(); + setProfile(userProfile); } catch (error) { console.error('Error fetching user profile:', error); }