21 lines
582 B
TypeScript
21 lines
582 B
TypeScript
import type { SystemHealthStatus } from "../types/types";
|
|
|
|
export function capitalize(s?: string) {
|
|
return s ? s.charAt(0).toUpperCase() + s.slice(1) : "";
|
|
}
|
|
|
|
export const convertObjtoArray = (obj: Record<string, SystemHealthStatus[]>) => {
|
|
if (!obj) return;
|
|
const statusCategoryArray = Object.entries(obj);
|
|
return statusCategoryArray;
|
|
};
|
|
|
|
// const data = {
|
|
// camera: cameraFeedID,
|
|
// cells: Array.from(paintedCells.entries()).map(([key, cell]) => ({
|
|
// position: key,
|
|
// ...cell,
|
|
// region: regions[selectedRegionIndex]?.name || "Unnamed",
|
|
// })),
|
|
// };
|