From ebb7fab8eed3f6b9fbfe86828a807dad39df6eb7 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 19 Dec 2024 15:20:51 +0300 Subject: [PATCH] removes hasMagicCodeBeenSent from the dependency list --- src/components/ValidateCodeActionModal/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 (