refactor: add condition to render divider

main
Josue 4 years ago
parent 57c891bfdf
commit bf93f5a5db
  1. 6
      striker-ui/components/Resource/ResourceVolumes.tsx

@ -79,7 +79,7 @@ const ResourceVolumes = ({
</Box> </Box>
</PanelHeader> </PanelHeader>
{volume.connections.map( {volume.connections.map(
(connection): JSX.Element => { (connection, index): JSX.Element => {
return ( return (
<> <>
<Box <Box
@ -114,7 +114,9 @@ const ResourceVolumes = ({
</Box> </Box>
</Box> </Box>
</Box> </Box>
<Divider className={classes.divider} /> {volume.connections.length - 1 !== index ? (
<Divider className={classes.divider} />
) : null}
</> </>
); );
}, },

Loading…
Cancel
Save