import styled from '@emotion/styled'; import DateTime from 'sentry/components/dateTime'; import Duration from 'sentry/components/duration'; import Placeholder from 'sentry/components/placeholder'; import {Provider as ReplayContextProvider} from 'sentry/components/replays/replayContext'; import ReplayView from 'sentry/components/replays/replayView'; import {t} from 'sentry/locale'; import space from 'sentry/styles/space'; import useFullscreen from 'sentry/utils/replays/hooks/useFullscreen'; import useReplayData from 'sentry/utils/replays/hooks/useReplayData'; import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight'; type Props = { orgSlug: string; replaySlug: string; }; function ReplayContent({orgSlug, replaySlug}: Props) { const {fetching, replay, fetchError} = useReplayData({ orgSlug, replaySlug, }); const {ref: fullscreenRef, toggle: toggleFullscreen} = useFullscreen(); const replayRecord = replay?.getReplay(); const replayEvent = replay?.getEvent(); if (fetchError) { throw new Error('Failed to load Replay'); } if (fetching || !replayRecord || !replayEvent) { return ; } return (
{t('Replay')}
{t('Id')}
{replayRecord.replayId}
{t('URL')}
{replayEvent.culprit}
{t('Timestamp')}
              
            
{t('Duration')}
              
            
); } const PlayerContainer = styled(FluidHeight)` margin-bottom: ${space(2)}; background: ${p => p.theme.background}; `; const StyledPlaceholder = styled(Placeholder)` margin-top: ${space(2)}; `; export default ReplayContent;