Skip to content

Commit

Permalink
Remove double copy icon @dwiley-akamai
Browse files Browse the repository at this point in the history
  • Loading branch information
jaalah committed Dec 4, 2024
1 parent ad14035 commit 1edce89
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,27 @@ export const HostNameTableCell = (props: Props) => {
const firstRegion = regions[0];
const formattedFirstEndpoint = formatEndpoint(firstRegion);
const allEndpoints = regions.map(formatEndpoint).join('\n');
const showMultipleRegions = regions.length > 1;

return (
<TableCell>
{formattedFirstEndpoint}&nbsp;
{regions.length === 1 && (
<StyledCopyIcon text={firstRegion.s3_endpoint} />
)}
{regions.length > 1 && (
{showMultipleRegions ? (
<>
| +{regions.length - 1} regions |&nbsp;
<StyledLinkButton
onClick={() => {
setHostNames(regions);
setShowHostNamesDrawers(true);
}}
type="button"
>
Show All
</StyledLinkButton>
<StyledCopyIcon text={allEndpoints} />
</>
) : (
<StyledCopyIcon text={firstRegion.s3_endpoint} />
)}
<StyledCopyIcon text={allEndpoints} />
</TableCell>
);
};
Expand Down

0 comments on commit 1edce89

Please sign in to comment.