Refactor incidents

This commit is contained in:
Alex Holliday committed 2025-01-29 15:06:41 -08:00
1 parent c1144a4432
commit 02d93fdcd4
14 files changed
+383 -513

No files matched your search

+17 -4
View File
@@ -6,13 +6,13 @@ import UptimeDataTable from "./Components/UptimeDataTable";
import Pagination from "../../../Components/Table/TablePagination";
import CreateMonitorHeader from "../../../Components/CreateMonitorHeader";
import Fallback from "../../../Components/Fallback";
import NetworkErrorFallback from "../../../Components/NetworkErrorFallback";
import GenericFallback from "../../../Components/GenericFallback";
import SearchComponent from "./Components/SearchComponent";
import MonitorCountHeader from "../../../Components/MonitorCountHeader";
// MUI Components
import { Stack, Box, Button } from "@mui/material";
import { Stack, Box, Button, Typography } from "@mui/material";
// Utils
import { useState, useCallback } from "react";
@@ -109,8 +109,21 @@ const UptimeMonitors = () => {
});
const totalMonitors = monitorsSummary?.totalMonitors ?? 0;
if (networkError) return <NetworkErrorFallback />;
if (networkError) {
return (
<GenericFallback>
{" "}
<Typography
variant="h1"
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
Network error
</Typography>
<Typography>Please check your connection</Typography>
</GenericFallback>
);
}
if (!isLoading && !monitorsAreLoading && totalMonitors === 0) {
return (
<Fallback