remove box container and move fallback outisde wrapper

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-02-18 13:53:02 -05:00
1 parent e5246e82cc
commit 96378a5581
1 file changed
+16 -29
+16 -29
View File
@@ -42,22 +42,23 @@ const Maintenance = () => {
fetchMaintenanceWindows();
}, [page, rowsPerPage, updateTrigger]);
if (maintenanceWindows.length === 0) {
return (
<Box
className="maintenance table-container"
sx={{
':has(> [class*="fallback__"])': {
position: "relative",
border: 1,
borderColor: theme.palette.primary.lowContrast,
borderRadius: theme.shape.borderRadius,
borderStyle: "dashed",
backgroundColor: theme.palette.primary.main,
overflow: "hidden",
},
}}
>
{maintenanceWindows.length > 0 && (
<Fallback
title="maintenance window"
checks={[
"Mark your maintenance periods",
"Eliminate any misunderstandings",
"Stop sending alerts in maintenance windows",
]}
link="/maintenance/create"
isAdmin={isAdmin}
/>
);
}
return (
<Stack gap={theme.spacing(8)}>
<Stack
direction="row"
@@ -88,20 +89,6 @@ const Maintenance = () => {
updateCallback={handleActionMenuDelete}
/>
</Stack>
)}
{maintenanceWindows.length === 0 && (
<Fallback
title="maintenance window"
checks={[
"Mark your maintenance periods",
"Eliminate any misunderstandings",
"Stop sending alerts in maintenance windows",
]}
link="/maintenance/create"
isAdmin={isAdmin}
/>
)}
</Box>
);
};