1
1
import { useRef , useState } from 'react' ;
2
- import styled from '@emotion/styled' ;
3
2
4
3
import AnalyticsArea from 'sentry/components/analyticsArea' ;
5
4
import { ButtonBar } from 'sentry/components/core/button/buttonBar' ;
@@ -12,13 +11,14 @@ import {
12
11
SearchInput ,
13
12
} from 'sentry/components/events/eventDrawer' ;
14
13
import { IconSearch } from 'sentry/icons' ;
15
- import { t , tct } from 'sentry/locale' ;
14
+ import { t } from 'sentry/locale' ;
16
15
import type { Group } from 'sentry/types/group' ;
17
16
import { trackAnalytics } from 'sentry/utils/analytics' ;
18
17
import useOrganization from 'sentry/utils/useOrganization' ;
19
18
import { useParams } from 'sentry/utils/useParams' ;
20
19
import useProjects from 'sentry/utils/useProjects' ;
21
20
import GroupDistributionCrumbs from 'sentry/views/issueDetails/groupDistributions/groupDistributionCrumbs' ;
21
+ import HeaderTitle from 'sentry/views/issueDetails/groupDistributions/headerTitle' ;
22
22
import TagExportDropdown from 'sentry/views/issueDetails/groupDistributions/tagExportDropdown' ;
23
23
import TagFlagPicker from 'sentry/views/issueDetails/groupDistributions/tagFlagPicker' ;
24
24
import { DrawerTab } from 'sentry/views/issueDetails/groupDistributions/types' ;
@@ -29,20 +29,6 @@ import {TagDetailsDrawerContent} from 'sentry/views/issueDetails/groupTags/tagDe
29
29
import TagDrawerContent from 'sentry/views/issueDetails/groupTags/tagDrawerContent' ;
30
30
import { useEnvironmentsFromUrl } from 'sentry/views/issueDetails/utils' ;
31
31
32
- function getHeaderTitle (
33
- tagKey : string | undefined ,
34
- tab : DrawerTab ,
35
- includeFeatureFlagsTab : boolean
36
- ) {
37
- if ( tagKey ) {
38
- return tab === DrawerTab . TAGS
39
- ? tct ( 'Tag Details - [tagKey]' , { tagKey} )
40
- : tct ( 'Feature Flag Details - [tagKey]' , { tagKey} ) ;
41
- }
42
-
43
- return includeFeatureFlagsTab ? t ( 'Tags & Feature Flags' ) : t ( 'All Tags' ) ;
44
- }
45
-
46
32
/**
47
33
* Shared tags and feature flags distributions drawer, used by streamlined issue details UI.
48
34
*/
@@ -123,7 +109,11 @@ function BaseGroupDistributionsDrawer({
123
109
< GroupDistributionCrumbs group = { group } project = { project } tab = { tab } />
124
110
</ EventDrawerHeader >
125
111
< EventNavigator >
126
- < Header > { getHeaderTitle ( tagKey , tab , includeFeatureFlagsTab ) } </ Header >
112
+ < HeaderTitle
113
+ includeFeatureFlagsTab = { includeFeatureFlagsTab }
114
+ tab = { tab }
115
+ tagKey = { tagKey }
116
+ />
127
117
{ headerActions }
128
118
</ EventNavigator >
129
119
< EventDrawerBody >
@@ -154,10 +144,3 @@ function BaseGroupDistributionsDrawer({
154
144
</ EventDrawerContainer >
155
145
) ;
156
146
}
157
-
158
- const Header = styled ( 'h3' ) `
159
- ${ p => p . theme . overflowEllipsis } ;
160
- font-size: ${ p => p . theme . fontSizeExtraLarge } ;
161
- font-weight: ${ p => p . theme . fontWeightBold } ;
162
- margin: 0;
163
- ` ;
0 commit comments