[TS] Typecheck skipping Src

This commit is contained in:
Dunemask 2024-03-29 16:58:17 -06:00
parent e1fe6c2f3b
commit 8c15dd6752
41 changed files with 43 additions and 2 deletions

View file

@ -1,23 +0,0 @@
import { useState, useEffect } from "react";
import { useSystemAvailable } from "@mcl/queries";
import Box from "@mui/material/Box";
import OverviewVisual from "./OverviewVisual.jsx";
export default function Overview(props) {
const [memory, setMemory] = useState(100);
const [cpu, setCpu] = useState(100);
const { isLoading: systemLoading, data: systemAvailable } =
useSystemAvailable();
useEffect(() => {
if (systemLoading || !props.clusterMetrics) return;
setCpu((props.clusterMetrics.cpu / systemAvailable.cpu) * 100);
setMemory((props.clusterMetrics.memory / systemAvailable.memory) * 100);
}, [systemAvailable, props.clusterMetrics]);
return (
<Box className="overview-toolbar">
<OverviewVisual value={cpu} color="warning" label="CPU" />
<OverviewVisual value={memory} color="success" label="MEMORY" />
</Box>
);
}