Fix few bad hook dependencies
This commit is contained in:
@@ -64,7 +64,6 @@
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
"jsx-a11y/no-static-element-interactions": "off"
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ const AdminLoginPage: NextPage = () => {
|
||||
router.push(next);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
}, [router, next]);
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -48,7 +48,7 @@ const useShouldRedirect = (enabled = true) => {
|
||||
setCompleted(true);
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
}, [enabled]);
|
||||
|
||||
return {
|
||||
redirecting,
|
||||
|
||||
Reference in New Issue
Block a user