Skip to content

Commit

Permalink
Merge pull request #54405 from FitseTLT/fix-resending-validation-code…
Browse files Browse the repository at this point in the history
…-on-entering-wrong-code

Fix - Validate account - When validate page is opened twice, code error auto disappears
  • Loading branch information
marcochavezf authored Dec 30, 2024
2 parents aeea124 + ebb7fab commit 0ad6d5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/ValidateCodeActionModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Modal
Expand Down

0 comments on commit 0ad6d5f

Please sign in to comment.