@@ -10,6 +10,7 @@ import {t} from 'sentry/locale';
1010import { formatBytesBase10 } from 'sentry/utils/bytes/formatBytesBase10' ;
1111import { getFormat , getFormattedDate , getUtcToSystem } from 'sentry/utils/dates' ;
1212import { unreachable } from 'sentry/utils/unreachable' ;
13+ import useOrganization from 'sentry/utils/useOrganization' ;
1314import { openInstallModal } from 'sentry/views/preprod/components/installModal' ;
1415import {
1516 BuildDetailsSizeAnalysisState ,
@@ -70,19 +71,26 @@ interface BuildDetailsSidebarAppInfoProps {
7071}
7172
7273export function BuildDetailsSidebarAppInfo ( props : BuildDetailsSidebarAppInfoProps ) {
74+ const organization = useOrganization ( ) ;
7375 const labels = getLabels ( props . appInfo . platform ?? undefined ) ;
7476
7577 const datetimeFormat = getFormat ( {
7678 seconds : true ,
7779 timeZone : true ,
7880 } ) ;
7981
82+ let iconUrl = null ;
83+ if ( props . appInfo . app_icon_id ) {
84+ iconUrl = `/api/0/projects/${ organization . slug } /${ props . projectId } /files/app-icons/${ props . appInfo . app_icon_id } /` ;
85+ }
86+
8087 return (
8188 < Flex direction = "column" gap = "xl" >
8289 < Flex align = "center" gap = "sm" >
83- < AppIcon >
90+ { iconUrl && < img src = { iconUrl } alt = "App Icon" width = { 24 } height = { 24 } /> }
91+ { ! iconUrl && (
8492 < AppIconPlaceholder > { props . appInfo . name ?. charAt ( 0 ) || '' } </ AppIconPlaceholder >
85- </ AppIcon >
93+ ) }
8694 { props . appInfo . name && < Heading as = "h3" > { props . appInfo . name } </ Heading > }
8795 </ Flex >
8896
@@ -196,19 +204,16 @@ export function BuildDetailsSidebarAppInfo(props: BuildDetailsSidebarAppInfoProp
196204 ) ;
197205}
198206
199- const AppIcon = styled ( 'div' ) `
207+ const AppIconPlaceholder = styled ( 'div' ) `
200208 width: 24px;
201209 height: 24px;
202210 border-radius: 4px;
203- background: #ff6600;
204211 display: flex;
205212 align-items: center;
206213 justify-content: center;
207214 flex-shrink: 0;
208- ` ;
209-
210- const AppIconPlaceholder = styled ( 'div' ) `
211- color: white;
215+ background: ${ p => p . theme . purple400 } ;
216+ color: ${ p => p . theme . white } ;
212217 font-weight: ${ p => p . theme . fontWeight . bold } ;
213218 font-size: ${ p => p . theme . fontSize . sm } ;
214219` ;
0 commit comments