From e75c714148754fb41a9b4c17e6de2c42091076c9 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Thu, 20 Feb 2025 07:29:36 +0000 Subject: [PATCH] Merged in fix/SW-1695-clear-otp-password-on-error (pull request #1375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clear and focus OTP input on error Approved-by: Joakim Jäderberg --- .../(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx b/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx index c9b05b960..24e4282eb 100644 --- a/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx +++ b/app/[lang]/(partner)/(sas)/(protected)/sas-x-scandic/otp/OneTimePasswordForm.tsx @@ -100,6 +100,7 @@ export default function OneTimePasswordForm({ function handleOTPEntered(otp: string) { startTransition(async () => { const redirectRes = await onSubmit({ otp }) + setOtp("") if (redirectRes.type === "replace") { router.replace(redirectRes.url) return @@ -146,6 +147,7 @@ export default function OneTimePasswordForm({