import Stack from "@mui/material/Stack"; import Box from "@mui/material/Box"; import { useTheme } from "@mui/material/styles"; import type { ICheck } from "@/types/check"; import { normalizeResponseTimes } from "@/utils/DataUtils"; import { HeatmapResponseTimeTooltip } from "../common/HeatmapResponseTimeTooltip"; const BAR_HEIGHT = "50px"; export const HistogramStatusPage = ({ checks }: { checks: ICheck[] }) => { const theme = useTheme(); const normalChecks = normalizeResponseTimes(checks, "responseTime"); let data = Array(); if (!normalChecks || normalChecks.length === 0) { return null; } if (normalChecks.length !== 25) { const placeholders = Array(25 - normalChecks.length).fill({ status: "placeholder", }); data = [...normalChecks, ...placeholders]; } else { data = normalChecks; } return ( event.stopPropagation()} sx={{ cursor: "default", }} > {data.map((check, index) => { return ( ); })} ); };