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

This commit is contained in:
chauhan_s
2025-11-03 11:07:20 +00:00
committed by GitHub
parent b693b6898a
commit c6daa61e5e
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@calcom/atoms": minor
---
Fix Booker atom verify email dialog infinite re-render when entering verification code
@@ -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]);