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(); fetchMaintenanceWindows();
}, [page, rowsPerPage, updateTrigger]); }, [page, rowsPerPage, updateTrigger]);
if (maintenanceWindows.length === 0) {
return ( return (
<Box <Fallback
className="maintenance table-container" title="maintenance window"
sx={{ checks={[
':has(> [class*="fallback__"])': { "Mark your maintenance periods",
position: "relative", "Eliminate any misunderstandings",
border: 1, "Stop sending alerts in maintenance windows",
borderColor: theme.palette.primary.lowContrast, ]}
borderRadius: theme.shape.borderRadius, link="/maintenance/create"
borderStyle: "dashed", isAdmin={isAdmin}
backgroundColor: theme.palette.primary.main, />
overflow: "hidden", );
}, }
}}
> return (
{maintenanceWindows.length > 0 && (
<Stack gap={theme.spacing(8)}> <Stack gap={theme.spacing(8)}>
<Stack <Stack
direction="row" direction="row"
@@ -88,20 +89,6 @@ const Maintenance = () => {
updateCallback={handleActionMenuDelete} updateCallback={handleActionMenuDelete}
/> />
</Stack> </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>
); );
}; };