diff --git a/web-next/app/[locale]/security-token/SecurityTokenForm.tsx b/web-next/app/[locale]/security-token/SecurityTokenForm.tsx index 350675e..f232737 100644 --- a/web-next/app/[locale]/security-token/SecurityTokenForm.tsx +++ b/web-next/app/[locale]/security-token/SecurityTokenForm.tsx @@ -17,12 +17,11 @@ export function SecurityTokenForm({ initialDate }: { initialDate: string | null const t = useTranslations('SecurityToken') const [date, setDate] = useState(initialDate) const [busy, setBusy] = useState(false) - const [sent, setSent] = useState(false) const [message, setMessage] = useState<{ ok: boolean; text: string } | null>(null) async function request(e: React.FormEvent) { e.preventDefault() - if (busy || sent) return + if (busy) return setBusy(true) setMessage(null) try { @@ -30,7 +29,6 @@ export function SecurityTokenForm({ initialDate }: { initialDate: string | null const data: { success?: boolean; error?: string; tokenDate?: string } = await res.json() if (data.success) { setMessage({ ok: true, text: t('success') }) - setSent(true) if (data.tokenDate) setDate(data.tokenDate) } else { const key = (ERROR_KEYS as readonly string[]).includes(data.error ?? '') ? data.error! : 'genericError' @@ -54,13 +52,11 @@ export function SecurityTokenForm({ initialDate }: { initialDate: string | null

{date ? formatDate(date) : t('never')}


-

diff --git a/web-next/messages/en.json b/web-next/messages/en.json index 828a87e..5afb703 100644 --- a/web-next/messages/en.json +++ b/web-next/messages/en.json @@ -391,7 +391,6 @@ "never": "Not requested", "request": "Request token", "requesting": "Requesting token", - "sent": "Token sent", "forgot": "I forgot the Security token", "success": "The Security token has been sent to the account's email.", "cooldown": "You can only request a new Security token every 7 days.", diff --git a/web-next/messages/es.json b/web-next/messages/es.json index 70102c1..7cff32c 100644 --- a/web-next/messages/es.json +++ b/web-next/messages/es.json @@ -391,7 +391,6 @@ "never": "Sin solicitar", "request": "Solicitar token", "requesting": "Solicitando token", - "sent": "Token enviado", "forgot": "He olvidado el Token de seguridad", "success": "Se ha enviado el Token de seguridad al correo de la cuenta.", "cooldown": "Sólo puedes solicitar un nuevo Token de seguridad cada 7 días.",