Fix some instances of react-hooks/exhaustive-deps

This commit is contained in:
Alejandro Celaya
2023-09-02 19:08:12 +02:00
parent 4298893960
commit fbc47846e3
6 changed files with 47 additions and 32 deletions

View File

@@ -23,7 +23,7 @@ export const Home = ({ servers }: HomeProps) => {
// Try to redirect to the first server marked as auto-connect
const autoConnectServer = serversList.find(({ autoConnect }) => autoConnect);
autoConnectServer && navigate(`/server/${autoConnectServer.id}`);
}, []);
}, [serversList, navigate]);
return (
<div className="home">