import type { SystemHealthStatus } from "../../../types/types"; import Card from "../../../ui/Card"; import StatusIndicators from "../../../ui/StatusIndicators"; import { capitalize } from "../../../utils/utils"; import CameraStatusGridItem from "./CameraStatusGridItem"; type CameraStatusProps = { title: string; category: SystemHealthStatus[]; }; const CameraStatus = ({ title, category }: CameraStatusProps) => { const isAllGood = category?.every((status) => status.tags.includes("RUNNING")); // check if some are down // check if all are down //check if offline return (

{isAllGood ? : } {capitalize(title)}

{isAllGood ? "All systems running" : "Some systems down"}

{category && category?.length <= 0 ? (

Loading Camera health...

) : (
)}
); }; export default CameraStatus;