Skip to content

Commit

Permalink
fix(): add missing react useEffect hook dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lubarskyy committed Jul 21, 2022
1 parent b99e391 commit a1b7947
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/pages/Login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Login: React.FC = () => {

useEffect(() => {
if (loggedIn) navigate("/main");
}, [loggedIn]);
}, [loggedIn, navigate]);

return (
<TwoColumnHero>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/Register/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const Register: React.FC = () => {

React.useEffect(() => {
if (loggedIn) navigate("/main");
}, [loggedIn]);
}, [loggedIn, navigate]);

return (
<TwoColumnHero>
Expand Down

0 comments on commit a1b7947

Please sign in to comment.