From ae548aa389093cf72e5628f9edc761aca5b702b0 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Tue, 21 Oct 2025 18:08:27 +0000 Subject: [PATCH] Fix MFARemovalDialog build errors --- src/components/auth/MFARemovalDialog.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/auth/MFARemovalDialog.tsx b/src/components/auth/MFARemovalDialog.tsx index 3e12089a..c0f6aa87 100644 --- a/src/components/auth/MFARemovalDialog.tsx +++ b/src/components/auth/MFARemovalDialog.tsx @@ -4,6 +4,7 @@ import { invokeWithTracking } from '@/lib/edgeFunctionTracking'; import { useToast } from '@/hooks/use-toast'; import { getErrorMessage } from '@/lib/errorHandler'; import { useRequireMFA } from '@/hooks/useRequireMFA'; +import { getSessionAAL } from '@/types/supabase-session'; import { AlertDialog, AlertDialogAction, @@ -94,7 +95,11 @@ export function MFARemovalDialog({ open, onOpenChange, factorId, onSuccess }: MF }); setStep('totp'); } catch (error: unknown) { - toast.error(getErrorMessage(error)); + toast({ + title: 'Error', + description: getErrorMessage(error), + variant: 'destructive' + }); } finally { setLoading(false); } @@ -142,7 +147,11 @@ export function MFARemovalDialog({ open, onOpenChange, factorId, onSuccess }: MF }); setStep('confirm'); } catch (error: unknown) { - toast.error(getErrorMessage(error)); + toast({ + title: 'Error', + description: getErrorMessage(error), + variant: 'destructive' + }); } finally { setLoading(false); } @@ -179,7 +188,11 @@ export function MFARemovalDialog({ open, onOpenChange, factorId, onSuccess }: MF handleClose(); onSuccess(); } catch (error: unknown) { - toast.error(getErrorMessage(error)); + toast({ + title: 'Error', + description: getErrorMessage(error), + variant: 'destructive' + }); } finally { setLoading(false); }