Fix admin user detail page not showing email

This commit is contained in:
jjbrunton committed 2026-01-16 14:57:40 +00:00
1 parent e671ae9d1c
commit 23e24aa4c2
3 files changed
+6 -38

No files matched your search

@@ -331,7 +331,7 @@ export function UserDetailPage() {
expires_at: expiresAt,
});
if (error) throw error;
const { data: updatedProfile } = await supabase.from('profiles').select('*').eq('id', userId).single();
const { data: updatedProfile } = await supabase.rpc('get_profile_with_auth_info', { user_id: userId }).single();
if (updatedProfile) setProfile(updatedProfile);
setUpgradeOpen(false);
alert('User upgraded to premium successfully!');
@@ -347,7 +347,7 @@ export function UserDetailPage() {
if (!userId) return;
setLoading(true);
try {
const { data: profileData } = await supabase.from('profiles').select('*').eq('id', userId).single();
const { data: profileData } = await supabase.rpc('get_profile_with_auth_info', { user_id: userId }).single();
setProfile(profileData);
// Fetch feature interests for the user