add empty view for uptime details

This commit is contained in:
Alex Holliday committed 2025-01-31 07:32:49 -08:00
1 parent abd0006fb1
commit 6c2298b976
1 file changed
+10 -1
+10 -1
View File
@@ -6,8 +6,9 @@ import ChartBoxes from "./Components/ChartBoxes";
import ResponseTimeChart from "./Components/Charts/ResponseTimeChart";
import ResponseTable from "./Components/ResponseTable";
import UptimeStatusBoxes from "./Components/UptimeStatusBoxes";
import GenericFallback from "../../../Components/GenericFallback";
// MUI Components
import { Stack } from "@mui/material";
import { Stack, Typography } from "@mui/material";
// Utils
import { useState } from "react";
@@ -77,6 +78,14 @@ const UptimeDetails = () => {
setRowsPerPage(event.target.value);
};
if (!monitorIsLoading && !checksAreLoading && checksCount === 0) {
return (
<GenericFallback>
<Typography>There is no history for this monitor yet.</Typography>
</GenericFallback>
);
}
return (
<Stack gap={theme.spacing(10)}>
<Breadcrumbs list={BREADCRUMBS} />