Fix few bad hook dependencies

This commit is contained in:
Aarni Halinen
2021-01-16 21:44:32 +02:00
parent 7e297e4d41
commit 5caffc63d2
3 changed files with 2 additions and 3 deletions
-1
View File
@@ -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"
}
}
+1 -1
View File
@@ -26,7 +26,7 @@ const AdminLoginPage: NextPage = () => {
router.push(next);
}
});
}, []);
}, [router, next]);
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
+1 -1
View File
@@ -48,7 +48,7 @@ const useShouldRedirect = (enabled = true) => {
setCompleted(true);
});
}
}, []);
}, [enabled]);
return {
redirecting,