Skip to content

Commit

Permalink
fix: remove eslint disable line
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Oct 3, 2024
1 parent 4d02e0b commit 392d5d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ function BaseValidateCodeForm({

useEffect(() => {
clearError();
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, []);
}, [clearError]);

useEffect(() => {
if (!hasMagicCodeBeenSent) {
Expand Down
6 changes: 5 additions & 1 deletion src/pages/settings/Wallet/VerifyAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
[loginList, contactMethod],
);

const clearError = useCallback(() => {
User.clearContactMethodErrors(contactMethod, 'validateLogin');
}, [contactMethod]);

useEffect(() => {
if (!isUserValidated) {
return;
Expand All @@ -73,7 +77,7 @@ function VerifyAccountPage({route}: VerifyAccountPageProps) {
validateCodeAction={validateCodeAction}
validateError={validateLoginError}
handleSubmitForm={handleSubmitForm}
clearError={() => User.clearContactMethodErrors(contactMethod, 'validateLogin')}
clearError={clearError}
buttonStyles={[styles.justifyContentEnd, styles.flex1, safePaddingBottomStyle]}
/>
</View>
Expand Down

0 comments on commit 392d5d7

Please sign in to comment.