From c6daa61e5efe24665f3d3dd0bea33c79dda6f797 Mon Sep 17 00:00:00 2001 From: chauhan_s Date: Mon, 3 Nov 2025 16:37:20 +0530 Subject: [PATCH] fix: `Maximum update depth exceeded` error when entering the 6th digit of the email verification code. (#24857) --- .changeset/bitter-peas-pull.md | 5 +++++ packages/features/bookings/components/VerifyCodeDialog.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/bitter-peas-pull.md diff --git a/.changeset/bitter-peas-pull.md b/.changeset/bitter-peas-pull.md new file mode 100644 index 0000000000..220245ce5b --- /dev/null +++ b/.changeset/bitter-peas-pull.md @@ -0,0 +1,5 @@ +--- +"@calcom/atoms": minor +--- + +Fix Booker atom verify email dialog infinite re-render when entering verification code diff --git a/packages/features/bookings/components/VerifyCodeDialog.tsx b/packages/features/bookings/components/VerifyCodeDialog.tsx index d25215ddc4..5527be00ff 100644 --- a/packages/features/bookings/components/VerifyCodeDialog.tsx +++ b/packages/features/bookings/components/VerifyCodeDialog.tsx @@ -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]);