Files
Checkmate/client/src/Pages/StatusPage/StatusPages/index.jsx
T

43 lines
1.3 KiB
React
Raw Normal View History

2025-02-10 13:45:01 -08:00
// Components
2025-09-05 15:53:22 -04:00
import { Stack } from "@mui/material";
2025-09-27 14:54:55 -07:00
import Breadcrumbs from "@/Components/v1/Breadcrumbs/index.jsx";
import MonitorCreateHeader from "@/Components/v1/MonitorCreateHeader/index.jsx";
2025-09-25 10:11:41 -07:00
import StatusPagesTable from "./Components/StatusPagesTable/index.jsx";
2025-09-27 14:54:55 -07:00
import PageStateWrapper from "@/Components/v1/PageStateWrapper/index.jsx";
2025-02-10 13:45:01 -08:00
// Utils
import { useTheme } from "@emotion/react";
2025-09-25 10:11:41 -07:00
import { useStatusPagesFetch } from "./Hooks/useStatusPagesFetch.jsx";
2026-01-12 23:57:39 +00:00
import { useIsAdmin } from "@/Hooks/useIsAdmin.js";
2025-02-10 14:02:52 -08:00
const BREADCRUMBS = [{ name: `Status Pages`, path: "" }];
2025-02-10 13:45:01 -08:00
const StatusPages = () => {
// Utils
const theme = useTheme();
const isAdmin = useIsAdmin();
const [isLoading, networkError, statusPages] = useStatusPagesFetch();
return (
2025-09-05 15:53:22 -04:00
<>
<PageStateWrapper
networkError={networkError}
isLoading={isLoading}
2025-09-05 15:53:22 -04:00
items={statusPages}
type="statusPage"
fallbackLink="/status/uptime/create"
>
<Stack gap={theme.spacing(10)}>
<Breadcrumbs list={BREADCRUMBS} />
<MonitorCreateHeader
label="Create status page"
isAdmin={isAdmin}
path="/status/uptime/create"
isLoading={isLoading}
/>
<StatusPagesTable data={statusPages} />
</Stack>
</PageStateWrapper>
</>
2025-02-10 13:45:01 -08:00
);
};
export default StatusPages;