Skip to content

Commit

Permalink
silly mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucien950 committed May 15, 2024
1 parent b891ea4 commit 4253290
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions software/tracksight/frontend/src/app/visualize/livegraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,15 @@ export default function LiveGraph(props: {

const [validSignals, setValidSignals] = useState<string[]>([]);
useEffect(() => {
useEffect(() => {
if(!socket) return;
socket.emit("available_signals", { "ids": [] });
socket.on("available_signals_response", (signalNames) => {
setValidSignals(signalNames);
});
return () => {
socket.off("available_signals_response");
};
}, [socket]);
}, [])
if(!socket) return;
socket.emit("available_signals", { "ids": [] });
socket.on("available_signals_response", (signalNames) => {
setValidSignals(signalNames);
});
return () => {
socket.off("available_signals_response");
};
}, [socket]);

return (
<Card bodyStyle={{ display: 'flex', flexDirection: 'column' }}>
Expand Down

0 comments on commit 4253290

Please sign in to comment.