@@ -5,13 +5,15 @@ import type {Location} from 'history';
55
66import Count from 'sentry/components/count' ;
77import DeprecatedAssigneeSelector from 'sentry/components/deprecatedAssigneeSelector' ;
8+ import ExternalLink from 'sentry/components/links/externalLink' ;
89import Link from 'sentry/components/links/link' ;
910import { getRelativeSummary } from 'sentry/components/timeRangeSelector/utils' ;
1011import { Tooltip } from 'sentry/components/tooltip' ;
1112import { DEFAULT_STATS_PERIOD } from 'sentry/constants' ;
1213import { t } from 'sentry/locale' ;
1314import MemberListStore from 'sentry/stores/memberListStore' ;
1415import { space } from 'sentry/styles/space' ;
16+ import type { Annotation } from 'sentry/types/group' ;
1517import type { Organization } from 'sentry/types/organization' ;
1618import type { EventData } from 'sentry/utils/discover/eventView' ;
1719import EventView from 'sentry/utils/discover/eventView' ;
@@ -141,7 +143,23 @@ const SPECIAL_FIELDS: SpecialFields = {
141143 } ,
142144 links : {
143145 sortField : null ,
144- renderFunc : ( { links} ) => < LinksContainer dangerouslySetInnerHTML = { { __html : links } } /> ,
146+ renderFunc : ( { links} ) => {
147+ if ( typeof links === 'string' ) {
148+ return < LinksContainer dangerouslySetInnerHTML = { { __html : links } } /> ;
149+ }
150+ if ( isLinkAnnotation ( links ) ) {
151+ return (
152+ < LinksContainer >
153+ { links . map ( ( link , index ) => (
154+ < ExternalLink key = { index } href = { link . url } >
155+ { link . displayName }
156+ </ ExternalLink >
157+ ) ) }
158+ </ LinksContainer >
159+ ) ;
160+ }
161+ return < LinksContainer /> ;
162+ } ,
145163 } ,
146164} ;
147165
@@ -241,6 +259,10 @@ export function getSortField(field: string): string | null {
241259 }
242260}
243261
262+ function isLinkAnnotation ( value : unknown ) : value is Annotation [ ] {
263+ return Array . isArray ( value ) && value . every ( v => typeof v === 'object' ) ;
264+ }
265+
244266const contentStyle = css `
245267 width : 100% ;
246268 justify-content : space-between;
0 commit comments