Remove unnecessary boxes

This commit is contained in:
Manav Rathi
2024-11-04 15:14:41 +05:30
parent 18daf681de
commit f164df75fc
2 changed files with 20 additions and 27 deletions

View File

@@ -106,31 +106,24 @@ const ModifyMapEnabled = ({ open, onClose, onRootClose, mapEnabled }) => {
};
return (
<Box>
<NestedSidebarDrawer
{...{ open, onClose }}
onRootClose={handleRootClose}
slotProps={{
backdrop: {
sx: { "&&&": { backgroundColor: "transparent" } },
},
}}
>
{mapEnabled ? (
<DisableMap
onClose={onClose}
disableMap={disableMap}
onRootClose={handleRootClose}
/>
) : (
<EnableMap
onClose={onClose}
enableMap={enableMap}
onRootClose={handleRootClose}
/>
)}
</NestedSidebarDrawer>
</Box>
<NestedSidebarDrawer
{...{ open, onClose }}
onRootClose={handleRootClose}
>
{mapEnabled ? (
<DisableMap
onClose={onClose}
disableMap={disableMap}
onRootClose={handleRootClose}
/>
) : (
<EnableMap
onClose={onClose}
enableMap={enableMap}
onRootClose={handleRootClose}
/>
)}
</NestedSidebarDrawer>
);
};

View File

@@ -62,7 +62,7 @@ export const MLSettings: React.FC<NestedSidebarDrawerVisibilityProps> = ({
}
return (
<Box>
<>
<NestedSidebarDrawer
{...{ open, onClose }}
onRootClose={handleRootClose}
@@ -83,7 +83,7 @@ export const MLSettings: React.FC<NestedSidebarDrawerVisibilityProps> = ({
onRootClose={handleRootClose}
onConsent={handleConsent}
/>
</Box>
</>
);
};