Skip to content

Commit c6daa61

Browse files
authored
fix: Maximum update depth exceeded error when entering the 6th digit of the email verification code. (calcom#24857)
1 parent b693b68 commit c6daa61

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/bitter-peas-pull.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@calcom/atoms": minor
3+
---
4+
5+
Fix Booker atom verify email dialog infinite re-render when entering verification code

packages/features/bookings/components/VerifyCodeDialog.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const VerifyCodeDialog = ({
6868
value,
6969
email,
7070
verifyCodeWithSessionNotRequired,
71+
setVerificationCode,
7172
]);
7273

7374
useEffect(() => {
@@ -77,7 +78,8 @@ export const VerifyCodeDialog = ({
7778
if (hasVerified || error || isPending || !/^\d{6}$/.test(value.trim())) return;
7879

7980
verifyCode();
80-
}, [error, isPending, value, verifyCode, hasVerified]);
81+
// eslint-disable-next-line react-hooks/exhaustive-deps
82+
}, [error, isPending, value, hasVerified]);
8183

8284
useEffect(() => setValue(""), [isOpenDialog]);
8385

0 commit comments

Comments
 (0)