This commit is contained in:
Alex Holliday committed 2025-12-22 16:28:14 +00:00
1 parent 6323f70bd2
commit b200157f28
6 files changed
+214 -222

No files matched your search

+8 -12
View File
@@ -1,17 +1,13 @@
import { BasePage, BaseBox } from "@/components/design-elements";
import { BasePage } from "@/components/design-elements";
import { TimingsChart, CheckDetailsCard } from "@/components/checks/";
import Stack from "@mui/material/Stack";
import Grid from "@mui/material/Grid";
import { useParams } from "react-router";
import { useGet } from "@/hooks/UseApi";
import type { ICheck } from "@/types/check";
import useMediaQuery from "@mui/material/useMediaQuery";
import type { ApiResponse } from "@/types/api";
import { useTheme } from "@mui/material/styles";
const CheckDetails = () => {
const { id } = useParams();
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const { response, loading, error } = useGet<ApiResponse<ICheck>>(
`/checks/${id}`
@@ -20,14 +16,14 @@ const CheckDetails = () => {
const check = response?.data || null;
return (
<BasePage loading={loading} error={error}>
<Stack direction={isSmall ? "column" : "row"} spacing={4}>
<BaseBox p={4} flex={1}>
<Grid container spacing={4}>
<Grid size={{ xs: 12, md: 6 }}>
<CheckDetailsCard check={check!} />
</BaseBox>
<BaseBox p={4} flex={1}>
</Grid>
<Grid size={{ xs: 12, md: 6 }}>
<TimingsChart check={check} />
</BaseBox>
</Stack>
</Grid>
</Grid>
</BasePage>
);
};