fix naming + data type

This commit is contained in:
csehviktor
2025-07-15 04:30:27 +02:00
parent 96b844d3ac
commit 5cc98e2b67
3 changed files with 11 additions and 9 deletions
+3 -1
View File
@@ -22,10 +22,12 @@ export function AgentPage() {
const { agent } = useParams();
const { status, message } = useWebsocket(`ws://localhost:3000/ws/${agent}`);
const [period, setPeriod] = useState<TimePeriod | "realtime">("all");
const [period, setPeriod] = useState<TimePeriod>("realtime");
const [history, setHistory] = useState<StatusMessage[] | null>(null);
useEffect(() => {
if (period === "realtime") return;
const fetchData = async () => {
const data = await getHistoricalData(
`http://localhost:3000/history/${agent}/${period}`,