1
1
import { Fragment } from 'react' ;
2
+ import { useTheme } from '@emotion/react' ;
2
3
import styled from '@emotion/styled' ;
3
4
4
5
import ButtonBar from 'sentry/components/buttonBar' ;
@@ -19,6 +20,7 @@ import parseLinkHeader from 'sentry/utils/parseLinkHeader';
19
20
import { keepPreviousData } from 'sentry/utils/queryClient' ;
20
21
import useReplayCountForIssues from 'sentry/utils/replayCount/useReplayCountForIssues' ;
21
22
import { useLocation } from 'sentry/utils/useLocation' ;
23
+ import useMedia from 'sentry/utils/useMedia' ;
22
24
import useOrganization from 'sentry/utils/useOrganization' ;
23
25
import { hasDatasetSelector } from 'sentry/views/dashboards/utils' ;
24
26
import { useGroupEventAttachments } from 'sentry/views/issueDetails/groupEventAttachments/useGroupEventAttachments' ;
@@ -51,6 +53,8 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
51
53
const eventView = useIssueDetailsEventView ( { group} ) ;
52
54
const { eventCount} = useIssueDetails ( ) ;
53
55
const issueTypeConfig = getConfigForIssueType ( group , group . project ) ;
56
+ const theme = useTheme ( ) ;
57
+ const isSmallScreen = useMedia ( `(max-width: ${ theme . breakpoints . small } )` ) ;
54
58
55
59
const hideDropdownButton =
56
60
! issueTypeConfig . pages . attachments . enabled &&
@@ -213,7 +217,9 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
213
217
analyticsEventKey = "issue_details.all_events_clicked"
214
218
analyticsEventName = "Issue Details: All Events Clicked"
215
219
>
216
- { t ( 'View More %s' , issueTypeConfig . customCopy . eventUnits ) }
220
+ { isSmallScreen
221
+ ? t ( 'More %s' , issueTypeConfig . customCopy . eventUnits )
222
+ : t ( 'View More %s' , issueTypeConfig . customCopy . eventUnits ) }
217
223
</ LinkButton >
218
224
) }
219
225
{ issueTypeConfig . pages . openPeriods . enabled && (
@@ -226,7 +232,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
226
232
analyticsEventKey = "issue_details.all_open_periods_clicked"
227
233
analyticsEventName = "Issue Details: All Open Periods Clicked"
228
234
>
229
- { t ( 'View More Open Periods' ) }
235
+ { isSmallScreen ? t ( 'More Open Periods' ) : t ( 'View More Open Periods' ) }
230
236
</ LinkButton >
231
237
) }
232
238
{ issueTypeConfig . pages . checkIns . enabled && (
@@ -239,7 +245,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
239
245
analyticsEventKey = "issue_details.all_checks_ins_clicked"
240
246
analyticsEventName = "Issue Details: All Checks-Ins Clicked"
241
247
>
242
- { t ( 'View More Check-Ins' ) }
248
+ { isSmallScreen ? t ( 'More Check-Ins' ) : t ( 'View More Check-Ins' ) }
243
249
</ LinkButton >
244
250
) }
245
251
{ issueTypeConfig . pages . uptimeChecks . enabled && (
@@ -252,7 +258,7 @@ export function IssueEventNavigation({event, group}: IssueEventNavigationProps)
252
258
analyticsEventKey = "issue_details.all_uptime_checks_clicked"
253
259
analyticsEventName = "Issue Details: All Uptime Checks Clicked"
254
260
>
255
- { t ( 'View More Uptime Checks' ) }
261
+ { isSmallScreen ? t ( 'More Uptime Checks' ) : t ( 'View More Uptime Checks' ) }
256
262
</ LinkButton >
257
263
) }
258
264
</ Fragment >
0 commit comments