Skip to content

Commit

Permalink
feat: add missing os to icon mapping (#29179)
Browse files Browse the repository at this point in the history
  • Loading branch information
lricoy authored Feb 25, 2025
1 parent 3506ea1 commit 739c08e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/src/lib/components/PropertyIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ const osIcons = {
['android']: <IconAndroidOS />,
['ios']: <IconAppleIOS />,
['other']: <IconGearFilled />,
['chrome os']: <IconChrome />,
['windows mobile']: <IconWindows />,
['windows phone']: <IconWindows />,
['xbox']: <IconWindows />,
['playstation']: <IconHeadset />,
['nintendo']: <IconHeadset />,
['blackberry']: <IconBlackberry />,
['watchos']: <IconMacOS />,
}

export const PROPERTIES_ICON_MAP = {
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/scenes/web-analytics/tiles/WebAnalyticsTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,16 @@ const BreakdownValueCell: QueryContextColumnComponent = (props) => {
)
}
break
case WebStatsBreakdown.OS:
if (typeof value === 'string') {
return (
<div className="flex items-center gap-2">
<PropertyIcon property="$os" value={value} />
<span>{value}</span>
</div>
)
}
break
}

if (typeof value === 'string') {
Expand Down

0 comments on commit 739c08e

Please sign in to comment.