// Components import { Stack, Typography } from "@mui/material"; import StatBox from "../../../../../Components/StatBox"; // Utils import { useTheme } from "@mui/material/styles"; import useUtils from "../../../Home/Hooks/useUtils"; import { getHumanReadableDuration } from "../../../../../Utils/timeUtils"; const StatusBoxes = ({ monitor, certificateExpiry }) => { const theme = useTheme(); const { time: streakTime, units: streakUnits } = getHumanReadableDuration( monitor?.uptimeStreak ); const { time: lastCheckTime, units: lastCheckUnits } = getHumanReadableDuration( monitor?.timeSinceLastCheck ); const { determineState } = useUtils(); return ( {streakTime} {streakUnits} } /> {lastCheckTime} {lastCheckUnits} {"ago"} } /> {monitor?.latestResponseTime} {"ms"} } /> {certificateExpiry} } /> ); }; export default StatusBoxes;