fix: validate simulator dates and reconcile QA calculations reports and language

This commit is contained in:
2026-10-20 21:00:52 +02:00
parent 59ab4fe956
commit a690c665fb
39 changed files with 757 additions and 184 deletions
+12 -3
View File
@@ -55,7 +55,10 @@ export const useTwoFactorAuth = (): UseTwoFactorAuthReturn => {
setQrCodeSvg(svg);
} catch {
setErrors((prev) => [...prev, 'Failed to fetch QR code']);
setErrors((prev) => [
...prev,
'Não foi possível carregar o código QR.',
]);
setQrCodeSvg(null);
}
}, [submit]);
@@ -68,7 +71,10 @@ export const useTwoFactorAuth = (): UseTwoFactorAuthReturn => {
setManualSetupKey(key);
} catch {
setErrors((prev) => [...prev, 'Failed to fetch a setup key']);
setErrors((prev) => [
...prev,
'Não foi possível carregar a chave de configuração.',
]);
setManualSetupKey(null);
}
}, [submit]);
@@ -79,7 +85,10 @@ export const useTwoFactorAuth = (): UseTwoFactorAuthReturn => {
const codes = (await submit(recoveryCodes())) as string[];
setRecoveryCodesList(codes);
} catch {
setErrors((prev) => [...prev, 'Failed to fetch recovery codes']);
setErrors((prev) => [
...prev,
'Não foi possível carregar os códigos de recuperação.',
]);
setRecoveryCodesList([]);
}
}, [submit]);