style(striker-ui): fix style linting errors in components

main
Tsu-ba-me 3 years ago
parent c2f38a3f00
commit 0db0a94a05
  1. 13
      striker-ui/components/Hosts/AnvilHost.tsx
  2. 18
      striker-ui/components/Resource/ResourceVolumes.tsx

@ -73,7 +73,8 @@ const AnvilHost = ({
return (
<Box className={classes.root}>
{hosts &&
hosts.map((host): JSX.Element => {
hosts.map(
(host): JSX.Element => {
return (
<InnerPanel key={host.host_uuid}>
<PanelHeader>
@ -103,10 +104,13 @@ const AnvilHost = ({
<Switch
checked={host.state === 'online'}
onChange={() =>
putFetch(`${process.env.NEXT_PUBLIC_API_URL}/set_power`, {
putFetch(
`${process.env.NEXT_PUBLIC_API_URL}/set_power`,
{
host_uuid: host.host_uuid,
is_on: !(host.state === 'online'),
})
},
)
}
/>
</Box>
@ -150,7 +154,8 @@ const AnvilHost = ({
)}
</InnerPanel>
);
})}
},
)}
</Box>
);
};

@ -78,7 +78,8 @@ const ResourceVolumes = ({
</Box>
</Box>
</PanelHeader>
{volume.connections.map((connection, index): JSX.Element => {
{volume.connections.map(
(connection, index): JSX.Element => {
return (
<>
<Box
@ -89,14 +90,20 @@ const ResourceVolumes = ({
>
<Box className={classes.decoratorBox}>
<Decorator
colour={selectDecorator(connection.connection_state)}
colour={selectDecorator(
connection.connection_state,
)}
/>
</Box>
<Box>
<Box display="flex" width="100%">
<BodyText text={connection.targets[0].target_name} />
<BodyText
text={connection.targets[0].target_name}
/>
<InsertLinkIcon style={{ color: DIVIDER }} />
<BodyText text={connection.targets[1].target_name} />
<BodyText
text={connection.targets[1].target_name}
/>
</Box>
<Box
display="flex"
@ -112,7 +119,8 @@ const ResourceVolumes = ({
) : null}
</>
);
})}
},
)}
</InnerPanel>
);
})}

Loading…
Cancel
Save