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.
This commit is contained in:
Alex Bäuerle 2024-04-20 06:20:03 -07:00 committed by GitHub
parent 3c85ece23e
commit 6340cd9aed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 (