diff --git a/.eslintrc b/.eslintrc index 8371c72d..ff27eecb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -8,7 +8,6 @@ }, "ignorePatterns": ["src/service*.ts"], "rules": { - "react-hooks/rules-of-hooks": "off", - "react-hooks/exhaustive-deps": "off" + "react-hooks/rules-of-hooks": "off" } } diff --git a/src/servers/helpers/withSelectedServer.tsx b/src/servers/helpers/withSelectedServer.tsx index 58057af2..61804290 100644 --- a/src/servers/helpers/withSelectedServer.tsx +++ b/src/servers/helpers/withSelectedServer.tsx @@ -18,7 +18,7 @@ export function withSelectedServer(WrappedComponent: FC { params.serverId && selectServer(params.serverId); - }, [params.serverId]); + }, [params.serverId, selectServer]); if (!selectedServer) { return ( diff --git a/src/servers/helpers/withoutSelectedServer.tsx b/src/servers/helpers/withoutSelectedServer.tsx index 53f5b4c7..1c12adb7 100644 --- a/src/servers/helpers/withoutSelectedServer.tsx +++ b/src/servers/helpers/withoutSelectedServer.tsx @@ -10,7 +10,7 @@ export function withoutSelectedServer(WrappedComponent: FC { resetSelectedServer(); - }, []); + }, [resetSelectedServer]); return ; };