chore: fixed merge request suggestion for adding depency array
This commit is contained in:
@@ -4,8 +4,6 @@ export default function ConnectedRobots() {
|
||||
|
||||
const [connected, setConnected] = useState<boolean | null>(null);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
// We're excepting a stream of data like that looks like this: `data = False` or `data = True`
|
||||
const eventSource = new EventSource("http://localhost:8000/robot/ping_stream");
|
||||
@@ -29,7 +27,7 @@ export default function ConnectedRobots() {
|
||||
}
|
||||
};
|
||||
return () => eventSource.close();
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user