Skip to content

Commit

Permalink
Didn't need the type to mess with me there
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Sep 18, 2023
1 parent 581d8fc commit 4594b11
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/components/BrowserSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,18 @@ export const BrowserSelector = ({

type Link = ComponentProps<typeof TooltipMenu>["links"][0];

const links: Link[] =
browserResults.length > 1
? browserResults.map(
({ browser, result }): Link => ({
active: selectedBrowser === browser,
id: browser.id,
onClick: () => onSelectBrowser(browser),
right: !isAccepted && result !== ComparisonResult.Equal && (
<StatusDot status={result} />
),
icon: browserIcons[browser.key],
title: browser.name,
})
)
: [];

const links =
browserResults.length > 1 &&
browserResults.map(
({ browser, result }): Link => ({
active: selectedBrowser === browser,
id: browser.id,
onClick: () => onSelectBrowser(browser),
right: !isAccepted && result !== ComparisonResult.Equal && <StatusDot status={result} />,
icon: browserIcons[browser.key],
title: browser.name,
})
);
return (
<WithTooltip
hasChrome={false}
Expand Down

0 comments on commit 4594b11

Please sign in to comment.