1- import { Fragment , useState } from 'react' ;
1+ import { Fragment } from 'react' ;
22import styled from '@emotion/styled' ;
33
4- import { Button } from 'sentry/components/button' ;
5- import { useReplayContext } from 'sentry/components/replays/replayContext' ;
64import ReplayController from 'sentry/components/replays/replayController' ;
75import ReplayCurrentUrl from 'sentry/components/replays/replayCurrentUrl' ;
86import ReplayPlayer from 'sentry/components/replays/replayPlayer' ;
9- import { IconChevron } from 'sentry/icons' ;
10- import { t } from 'sentry/locale' ;
117import { space } from 'sentry/styles/space' ;
128import useOrganization from 'sentry/utils/useOrganization' ;
139import useIsFullscreen from 'sentry/utils/window/useIsFullscreen' ;
14- import Breadcrumbs from 'sentry/views/replays/detail/breadcrumbs' ;
1510import BrowserOSIcons from 'sentry/views/replays/detail/browserOSIcons' ;
1611import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight' ;
1712
@@ -23,39 +18,16 @@ function ReplayView({toggleFullscreen}: Props) {
2318 const organization = useOrganization ( ) ;
2419 const hasNewTimeline = organization . features . includes ( 'session-replay-new-timeline' ) ;
2520 const isFullscreen = useIsFullscreen ( ) ;
26- const { replay} = useReplayContext ( ) ;
27- const [ isSidebarOpen , setIsSidebarOpen ] = useState ( true ) ;
2821
2922 return (
3023 < 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 >
5931 { isFullscreen || ! hasNewTimeline ? (
6032 < ReplayController toggleFullscreen = { toggleFullscreen } />
6133 ) : null }
@@ -78,23 +50,4 @@ const ContextContainer = styled('div')`
7850 gap: ${ space ( 1 ) } ;
7951` ;
8052
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-
10053export default ReplayView ;
0 commit comments