diff --git a/src/components/ValidateCodeActionModal/index.tsx b/src/components/ValidateCodeActionModal/index.tsx index d0e00493e328..c25401d33494 100644 --- a/src/components/ValidateCodeActionModal/index.tsx +++ b/src/components/ValidateCodeActionModal/index.tsx @@ -49,7 +49,10 @@ function ValidateCodeActionModal({ firstRenderRef.current = false; sendValidateCode(); - }, [isVisible, sendValidateCode, hasMagicCodeBeenSent]); + // We only want to send validate code on first render not on change of hasMagicCodeBeenSent, so we don't add it as a dependency. + // eslint-disable-next-line react-compiler/react-compiler + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isVisible, sendValidateCode]); return (