mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 18:11:12 -05:00
Fix MFARemovalDialog build errors
This commit is contained in:
@@ -4,6 +4,7 @@ import { invokeWithTracking } from '@/lib/edgeFunctionTracking';
|
|||||||
import { useToast } from '@/hooks/use-toast';
|
import { useToast } from '@/hooks/use-toast';
|
||||||
import { getErrorMessage } from '@/lib/errorHandler';
|
import { getErrorMessage } from '@/lib/errorHandler';
|
||||||
import { useRequireMFA } from '@/hooks/useRequireMFA';
|
import { useRequireMFA } from '@/hooks/useRequireMFA';
|
||||||
|
import { getSessionAAL } from '@/types/supabase-session';
|
||||||
import {
|
import {
|
||||||
AlertDialog,
|
AlertDialog,
|
||||||
AlertDialogAction,
|
AlertDialogAction,
|
||||||
@@ -94,7 +95,11 @@ export function MFARemovalDialog({ open, onOpenChange, factorId, onSuccess }: MF
|
|||||||
});
|
});
|
||||||
setStep('totp');
|
setStep('totp');
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
toast.error(getErrorMessage(error));
|
toast({
|
||||||
|
title: 'Error',
|
||||||
|
description: getErrorMessage(error),
|
||||||
|
variant: 'destructive'
|
||||||
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -142,7 +147,11 @@ export function MFARemovalDialog({ open, onOpenChange, factorId, onSuccess }: MF
|
|||||||
});
|
});
|
||||||
setStep('confirm');
|
setStep('confirm');
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
toast.error(getErrorMessage(error));
|
toast({
|
||||||
|
title: 'Error',
|
||||||
|
description: getErrorMessage(error),
|
||||||
|
variant: 'destructive'
|
||||||
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
@@ -179,7 +188,11 @@ export function MFARemovalDialog({ open, onOpenChange, factorId, onSuccess }: MF
|
|||||||
handleClose();
|
handleClose();
|
||||||
onSuccess();
|
onSuccess();
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
toast.error(getErrorMessage(error));
|
toast({
|
||||||
|
title: 'Error',
|
||||||
|
description: getErrorMessage(error),
|
||||||
|
variant: 'destructive'
|
||||||
|
});
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user