From 0db0a94a05adc7b080621394bc3556576af5609f Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Fri, 19 Nov 2021 11:00:42 -0500 Subject: [PATCH] style(striker-ui): fix style linting errors in components --- striker-ui/components/Hosts/AnvilHost.tsx | 141 +++++++++--------- .../components/Resource/ResourceVolumes.tsx | 72 +++++---- 2 files changed, 113 insertions(+), 100 deletions(-) diff --git a/striker-ui/components/Hosts/AnvilHost.tsx b/striker-ui/components/Hosts/AnvilHost.tsx index b50e3038..1d013707 100644 --- a/striker-ui/components/Hosts/AnvilHost.tsx +++ b/striker-ui/components/Hosts/AnvilHost.tsx @@ -73,84 +73,89 @@ const AnvilHost = ({ return ( {hosts && - hosts.map((host): JSX.Element => { - return ( - - - + hosts.map( + (host): JSX.Element => { + return ( + + + + + + + + + + + + c.toUpperCase(), + ) || 'Not Available' + } + /> + + + + + + + - + + putFetch( + `${process.env.NEXT_PUBLIC_API_URL}/set_power`, + { + host_uuid: host.host_uuid, + is_on: !(host.state === 'online'), + }, + ) + } + /> - - + + - - c.toUpperCase(), - ) || 'Not Available' + + putFetch( + `${process.env.NEXT_PUBLIC_API_URL}/set_membership`, + { + host_uuid: host.host_uuid, + is_member: !(host.state === 'online'), + }, + ) } /> - - - - - - - - putFetch(`${process.env.NEXT_PUBLIC_API_URL}/set_power`, { - host_uuid: host.host_uuid, - is_on: !(host.state === 'online'), - }) - } - /> - - - - - - - putFetch( - `${process.env.NEXT_PUBLIC_API_URL}/set_membership`, - { - host_uuid: host.host_uuid, - is_member: !(host.state === 'online'), - }, - ) - } - /> - - - {host.state !== 'online' && host.state !== 'offline' && ( - <> - - - + {host.state !== 'online' && host.state !== 'offline' && ( + <> + + + + - - - - + + + + - - - )} - - ); - })} + + )} + + ); + }, + )} ); }; diff --git a/striker-ui/components/Resource/ResourceVolumes.tsx b/striker-ui/components/Resource/ResourceVolumes.tsx index 2903a723..a7ee79b4 100644 --- a/striker-ui/components/Resource/ResourceVolumes.tsx +++ b/striker-ui/components/Resource/ResourceVolumes.tsx @@ -78,41 +78,49 @@ const ResourceVolumes = ({ - {volume.connections.map((connection, index): JSX.Element => { - return ( - <> - - - - - - - - - + {volume.connections.map( + (connection, index): JSX.Element => { + return ( + <> + + + - - + + + + + + + + + - - {volume.connections.length - 1 !== index ? ( - - ) : null} - - ); - })} + {volume.connections.length - 1 !== index ? ( + + ) : null} + + ); + }, + )} ); })}