1
- import { Fragment , useState } from 'react' ;
1
+ import { Fragment } from 'react' ;
2
2
import styled from '@emotion/styled' ;
3
3
4
- import { Button } from 'sentry/components/button' ;
5
- import { useReplayContext } from 'sentry/components/replays/replayContext' ;
6
4
import ReplayController from 'sentry/components/replays/replayController' ;
7
5
import ReplayCurrentUrl from 'sentry/components/replays/replayCurrentUrl' ;
8
6
import ReplayPlayer from 'sentry/components/replays/replayPlayer' ;
9
- import { IconChevron } from 'sentry/icons' ;
10
- import { t } from 'sentry/locale' ;
11
7
import { space } from 'sentry/styles/space' ;
12
8
import useOrganization from 'sentry/utils/useOrganization' ;
13
9
import useIsFullscreen from 'sentry/utils/window/useIsFullscreen' ;
14
- import Breadcrumbs from 'sentry/views/replays/detail/breadcrumbs' ;
15
10
import BrowserOSIcons from 'sentry/views/replays/detail/browserOSIcons' ;
16
11
import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight' ;
17
12
@@ -23,39 +18,16 @@ function ReplayView({toggleFullscreen}: Props) {
23
18
const organization = useOrganization ( ) ;
24
19
const hasNewTimeline = organization . features . includes ( 'session-replay-new-timeline' ) ;
25
20
const isFullscreen = useIsFullscreen ( ) ;
26
- const { replay} = useReplayContext ( ) ;
27
- const [ isSidebarOpen , setIsSidebarOpen ] = useState ( true ) ;
28
21
29
22
return (
30
23
< Fragment >
31
- < PlayerBreadcrumbContainer >
32
- < PlayerContainer >
33
- < ContextContainer >
34
- < ReplayCurrentUrl />
35
- < BrowserOSIcons />
36
- { isFullscreen ? (
37
- < Button
38
- size = "sm"
39
- onClick = { ( ) => setIsSidebarOpen ( ! isSidebarOpen ) }
40
- icon = { < IconChevron direction = { isSidebarOpen ? 'right' : 'left' } /> }
41
- >
42
- { isSidebarOpen ? t ( 'Collapse Sidebar' ) : t ( 'Open Sidebar' ) }
43
- </ Button >
44
- ) : null }
45
- </ ContextContainer >
46
- < Panel >
47
- < ReplayPlayer />
48
- </ Panel >
49
- </ PlayerContainer >
50
- { isFullscreen && isSidebarOpen ? (
51
- < BreadcrumbContainer >
52
- < Breadcrumbs
53
- frames = { replay ?. getChapterFrames ( ) }
54
- startTimestampMs = { replay ?. getReplay ( ) ?. started_at ?. getTime ( ) || 0 }
55
- />
56
- </ BreadcrumbContainer >
57
- ) : null }
58
- </ PlayerBreadcrumbContainer >
24
+ < ContextContainer >
25
+ < ReplayCurrentUrl />
26
+ < BrowserOSIcons />
27
+ </ ContextContainer >
28
+ < Panel >
29
+ < ReplayPlayer />
30
+ </ Panel >
59
31
{ isFullscreen || ! hasNewTimeline ? (
60
32
< ReplayController toggleFullscreen = { toggleFullscreen } />
61
33
) : null }
@@ -78,23 +50,4 @@ const ContextContainer = styled('div')`
78
50
gap: ${ space ( 1 ) } ;
79
51
` ;
80
52
81
- const PlayerContainer = styled ( 'div' ) `
82
- display: grid;
83
- grid-auto-flow: row;
84
- grid-template-rows: auto 1fr;
85
- gap: ${ space ( 1 ) } ;
86
- flex-grow: 1;
87
- ` ;
88
-
89
- const BreadcrumbContainer = styled ( 'div' ) `
90
- width: 25%;
91
- ` ;
92
-
93
- const PlayerBreadcrumbContainer = styled ( 'div' ) `
94
- display: flex;
95
- flex-direction: row;
96
- height: 100%;
97
- gap: ${ space ( 1 ) } ;
98
- ` ;
99
-
100
53
export default ReplayView ;
0 commit comments