feat: Implement plan for bug fixes

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 13:27:23 +00:00
parent 827f0f8ea5
commit ce6c9d6866
14 changed files with 94 additions and 59 deletions

View File

@@ -1,4 +1,5 @@
import { useState, useEffect } from 'react';
import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { Button } from '@/components/ui/button';
@@ -172,12 +173,11 @@ export function AccountProfileTab() {
}
// Call the edge function with explicit authorization header
const { data, error } = await supabase.functions.invoke('cancel-email-change', {
method: 'POST',
headers: {
Authorization: `Bearer ${session.access_token}`,
},
});
const { data, error, requestId } = await invokeWithTracking(
'cancel-email-change',
{},
user.id
);
if (error) {
console.error('Edge function error:', error);