fix: Maximum update depth exceeded error when entering the 6th digit of the email verification code. (#24857)

This commit is contained in:
chauhan_s authored and GitHub committed 2025-11-03 11:07:20 +00:00
1 parent b693b6898a
commit c6daa61e5e
2 files changed
+8 -1

No files matched your search

@@ -68,6 +68,7 @@ export const VerifyCodeDialog = ({
value,
email,
verifyCodeWithSessionNotRequired,
setVerificationCode,
]);
useEffect(() => {
@@ -77,7 +78,8 @@ export const VerifyCodeDialog = ({
if (hasVerified || error || isPending || !/^\d{6}$/.test(value.trim())) return;
verifyCode();
}, [error, isPending, value, verifyCode, hasVerified]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [error, isPending, value, hasVerified]);
useEffect(() => setValue(""), [isOpenDialog]);