Explorar o código

style: remove warning about useEffect (#1232)

This warning was appended to every PR. While the warningn typically makes sense, in this case we intentionally don't want to rerun if `desiredState` changes.
Alex Bäuerle hai 1 ano
pai
achega
6340cd9aed
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      frontend/src/components/AgentControlBar.tsx

+ 2 - 0
frontend/src/components/AgentControlBar.tsx

@@ -102,6 +102,8 @@ function AgentControlBar() {
     } else if (curTaskState === AgentTaskState.RUNNING) {
       setDesiredState(AgentTaskState.RUNNING);
     }
+    // We only want to run this effect when curTaskState changes
+    // eslint-disable-next-line react-hooks/exhaustive-deps
   }, [curTaskState]);
 
   return (