diff --git a/client/src/Components/monitors/charts/HistogramDetailsStacked.tsx b/client/src/Components/monitors/charts/HistogramDetailsStacked.tsx
new file mode 100644
index 000000000..a47af1a0d
--- /dev/null
+++ b/client/src/Components/monitors/charts/HistogramDetailsStacked.tsx
@@ -0,0 +1,39 @@
+import type { GroupedUptimeCheck } from "@/Types/Check";
+import { Area, AreaChart, CartesianGrid, ResponsiveContainer } from "recharts";
+
+import { useTheme } from "@mui/material";
+
+export const HistogramDetailsStacked = ({
+ checks = [],
+ range,
+}: {
+ checks: GroupedUptimeCheck[];
+ range: string;
+}) => {
+ const theme = useTheme();
+
+ console.log(JSON.stringify(checks, null, 2));
+
+ return (
+
+
+
+
+
+
+ );
+};
diff --git a/client/src/Pages/Uptime/Details/index.tsx b/client/src/Pages/Uptime/Details/index.tsx
index 8828aa29a..7aa0b1046 100644
--- a/client/src/Pages/Uptime/Details/index.tsx
+++ b/client/src/Pages/Uptime/Details/index.tsx
@@ -31,6 +31,7 @@ import type { RootState } from "@/Types/state";
import { formatDateWithTz } from "@/Utils/TimeUtils";
import { t } from "i18next";
import { Typography } from "@mui/material";
+import { HistogramDetailsStacked } from "@/Components/monitors/charts/HistogramDetailsStacked";
const certificateDateFormat = "MMM D, YYYY h A";
@@ -72,6 +73,7 @@ const UptimeDetailsPage = () => {
);
const monitorData = monitorDetailsData?.monitorData;
+
const monitor = monitorData?.monitor;
const monitorStats = monitorDetailsData?.monitorStats ?? null;
@@ -165,10 +167,18 @@ const UptimeDetailsPage = () => {
{ keepPreviousData: true, revalidateOnFocus: false }
);
+ if (!monitorData) {
+ return null;
+ }
+
+ if (!monitor) {
+ return null;
+ }
+
const geoChecksForTable = geoChecksTableData?.geoChecks ?? [];
const geoChecksCount = geoChecksTableData?.geoChecksCount ?? 0;
- const geoLocations = monitor?.geoCheckLocations;
+ const geoLocations = monitor.geoCheckLocations;
const checks = checksData?.checks ?? [];
const checksCount = checksData?.checksCount ?? 0;
@@ -218,6 +228,10 @@ const UptimeDetailsPage = () => {
checks={monitorData?.groupedChecks || []}
range={dateRange}
/>
+