1
- import { Fragment , useMemo , useRef } from 'react' ;
1
+ import { Fragment , useMemo } from 'react' ;
2
2
import styled from '@emotion/styled' ;
3
3
4
4
import { Button } from 'sentry/components/core/button' ;
@@ -9,6 +9,17 @@ import {
9
9
useNeedsJetpackComposePiiNotice ,
10
10
} from 'sentry/components/replays/jetpackComposePiiNotice' ;
11
11
import ReplayTable from 'sentry/components/replays/table/replayTable' ;
12
+ import {
13
+ ReplayActivityColumn ,
14
+ ReplayBrowserColumn ,
15
+ ReplayCountDeadClicksColumn ,
16
+ ReplayCountErrorsColumn ,
17
+ ReplayCountRageClicksColumn ,
18
+ ReplayDurationColumn ,
19
+ ReplayOSColumn ,
20
+ ReplaySelectColumn ,
21
+ ReplaySessionColumn ,
22
+ } from 'sentry/components/replays/table/replayTableColumns' ;
12
23
import useReplayTableSort from 'sentry/components/replays/table/useReplayTableSort' ;
13
24
import { t , tct } from 'sentry/locale' ;
14
25
import { trackAnalytics } from 'sentry/utils/analytics' ;
@@ -25,7 +36,6 @@ import {
25
36
} from 'sentry/utils/replays/sdkVersions' ;
26
37
import { MutableSearch } from 'sentry/utils/tokenizeSearch' ;
27
38
import useLocationQuery from 'sentry/utils/url/useLocationQuery' ;
28
- import { useDimensions } from 'sentry/utils/useDimensions' ;
29
39
import { useLocalStorageState } from 'sentry/utils/useLocalStorageState' ;
30
40
import { useNavigate } from 'sentry/utils/useNavigate' ;
31
41
import useOrganization from 'sentry/utils/useOrganization' ;
@@ -35,10 +45,30 @@ import useAllMobileProj from 'sentry/views/replays/detail/useAllMobileProj';
35
45
import BulkDeleteAlert from 'sentry/views/replays/list/bulkDeleteAlert' ;
36
46
import ReplaysFilters from 'sentry/views/replays/list/filters' ;
37
47
import ReplaysSearch from 'sentry/views/replays/list/search' ;
38
- import useReplayIndexTableColumns from 'sentry/views/replays/list/useReplayIndexTableColumns' ;
39
48
import DeadRageSelectorCards from 'sentry/views/replays/selectors/deadRageSelectorCards' ;
40
49
import type { ReplayListRecord } from 'sentry/views/replays/types' ;
41
50
51
+ const COLUMNS_WEB = [
52
+ ReplaySelectColumn ,
53
+ ReplaySessionColumn ,
54
+ ReplayOSColumn ,
55
+ ReplayBrowserColumn ,
56
+ ReplayDurationColumn ,
57
+ ReplayCountDeadClicksColumn ,
58
+ ReplayCountRageClicksColumn ,
59
+ ReplayCountErrorsColumn ,
60
+ ReplayActivityColumn ,
61
+ ] as const ;
62
+
63
+ const COLUMNS_MOBILE = [
64
+ ReplaySelectColumn ,
65
+ ReplaySessionColumn ,
66
+ ReplayOSColumn ,
67
+ ReplayDurationColumn ,
68
+ ReplayCountErrorsColumn ,
69
+ ReplayActivityColumn ,
70
+ ] as const ;
71
+
42
72
export default function ReplayIndexTable ( ) {
43
73
const queryClient = useQueryClient ( ) ;
44
74
const organization = useOrganization ( ) ;
@@ -47,9 +77,6 @@ export default function ReplayIndexTable() {
47
77
selection : { projects} ,
48
78
} = usePageFilters ( ) ;
49
79
50
- const tableRef = useRef < HTMLDivElement > ( null ) ;
51
- const tableDimensions = useDimensions ( { elementRef : tableRef } ) ;
52
-
53
80
const rageClicksSdkVersion = useProjectSdkNeedsUpdate ( {
54
81
minVersion : MIN_DEAD_RAGE_CLICK_SDK . minVersion ,
55
82
projectId : projects . map ( String ) ,
@@ -82,7 +109,7 @@ export default function ReplayIndexTable() {
82
109
const replays = data ?. data ?. map ( mapResponseToReplayRecord ) ?? [ ] ;
83
110
84
111
const { allMobileProj} = useAllMobileProj ( { } ) ;
85
- const columns = useReplayIndexTableColumns ( { allMobileProj, tableDimensions } ) ;
112
+ const columns = allMobileProj ? COLUMNS_MOBILE : COLUMNS_WEB ;
86
113
87
114
const needsSDKUpdateForClickSearch = useNeedsSDKUpdateForClickSearch ( query ) ;
88
115
@@ -142,7 +169,6 @@ export default function ReplayIndexTable() {
142
169
</ Fragment >
143
170
) : (
144
171
< ReplayTable
145
- ref = { tableRef }
146
172
columns = { columns }
147
173
error = { error }
148
174
isPending = { isPending }
0 commit comments