File tree 3 files changed +43
-5
lines changed
static/app/views/issueDetails
3 files changed +43
-5
lines changed Original file line number Diff line number Diff line change
1
+ import styled from '@emotion/styled' ;
2
+
3
+ import Link from 'sentry/components/links/link' ;
4
+ import { useLocation } from 'sentry/utils/useLocation' ;
5
+ import type { GroupTag } from 'sentry/views/issueDetails/groupTags/useGroupTags' ;
6
+
7
+ export default function FlagDetailsLink ( {
8
+ tag,
9
+ children,
10
+ } : {
11
+ children : React . ReactNode ;
12
+ tag : GroupTag ;
13
+ } ) {
14
+ const location = useLocation ( ) ;
15
+
16
+ return (
17
+ < StyledLink
18
+ to = { {
19
+ pathname : `${ location . pathname } ${ tag . key } /` ,
20
+ query : location . query ,
21
+ } }
22
+ >
23
+ { children }
24
+ </ StyledLink >
25
+ ) ;
26
+ }
27
+
28
+ const StyledLink = styled ( Link ) `
29
+ border-radius: ${ p => p . theme . borderRadius } ;
30
+ display: block;
31
+
32
+ &:hover h5 {
33
+ text-decoration: underline;
34
+ }
35
+ ` ;
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import {t} from 'sentry/locale';
7
7
import type { Group } from 'sentry/types/group' ;
8
8
import useOrganization from 'sentry/utils/useOrganization' ;
9
9
import useProjectFromSlug from 'sentry/utils/useProjectFromSlug' ;
10
+ import FlagDetailsLink from 'sentry/views/issueDetails/groupFeatureFlags/flagDetailsLink' ;
10
11
import FlagDrawerCTA from 'sentry/views/issueDetails/groupFeatureFlags/flagDrawerCTA' ;
11
12
import useGroupFeatureFlags from 'sentry/views/issueDetails/groupFeatureFlags/useGroupFeatureFlags' ;
12
13
import {
13
14
Container ,
14
15
StyledEmptyStateWarning ,
15
16
} from 'sentry/views/issueDetails/groupTags/groupTagsDrawer' ;
16
- import TagDetailsLink from 'sentry/views/issueDetails/groupTags/tagDetailsLink' ;
17
17
import { TagDistribution } from 'sentry/views/issueDetails/groupTags/tagDistribution' ;
18
18
import type { GroupTag } from 'sentry/views/issueDetails/groupTags/useGroupTags' ;
19
19
@@ -87,10 +87,12 @@ export default function GroupFeatureFlagsDrawerContent({
87
87
</ StyledEmptyStateWarning >
88
88
) : (
89
89
< Container >
90
- { displayTags . map ( ( tag , tagIdx ) => (
91
- < TagDetailsLink tag = { tag } groupId = { group . id } key = { tagIdx } >
92
- < TagDistribution tag = { tag } key = { tagIdx } />
93
- </ TagDetailsLink >
90
+ { displayTags . map ( tag => (
91
+ < div key = { tag . name } >
92
+ < FlagDetailsLink tag = { tag } key = { tag . name } >
93
+ < TagDistribution tag = { tag } key = { tag . name } />
94
+ </ FlagDetailsLink >
95
+ </ div >
94
96
) ) }
95
97
</ Container >
96
98
) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export function useGroupTagsDrawer({
35
35
...location . query ,
36
36
tagDrawerSort : undefined ,
37
37
tab : undefined ,
38
+ flagDrawerCursor : undefined ,
38
39
} ,
39
40
} ,
40
41
{ replace : true }
You can’t perform that action at this time.
0 commit comments