1
1
import { Fragment , useCallback , useEffect , useMemo , useState } from 'react' ;
2
+ import { Outlet } from 'react-router-dom' ;
2
3
import styled from '@emotion/styled' ;
3
4
import * as Sentry from '@sentry/react' ;
4
5
import isEqual from 'lodash/isEqual' ;
@@ -82,10 +83,6 @@ import {
82
83
83
84
type Error = ( typeof ERROR_TYPES ) [ keyof typeof ERROR_TYPES ] | null ;
84
85
85
- interface GroupDetailsProps {
86
- children : React . ReactNode ;
87
- }
88
-
89
86
type FetchGroupDetailsState = {
90
87
error : boolean ;
91
88
errorType : Error ;
@@ -96,7 +93,8 @@ type FetchGroupDetailsState = {
96
93
refetchGroup : ( ) => void ;
97
94
} ;
98
95
99
- interface GroupDetailsContentProps extends GroupDetailsProps {
96
+ interface GroupDetailsContentProps {
97
+ children : React . ReactNode ;
100
98
event : Event | null ;
101
99
group : Group ;
102
100
project : Project ;
@@ -744,7 +742,11 @@ function GroupDetailsContent({
744
742
) ;
745
743
}
746
744
747
- function GroupDetailsPageContent ( props : GroupDetailsProps & FetchGroupDetailsState ) {
745
+ interface GroupDetailsPageContentProps extends FetchGroupDetailsState {
746
+ children : React . ReactNode ;
747
+ }
748
+
749
+ function GroupDetailsPageContent ( props : GroupDetailsPageContentProps ) {
748
750
const projectSlug = props . group ?. project ?. slug ;
749
751
const api = useApi ( ) ;
750
752
const organization = useOrganization ( ) ;
@@ -857,7 +859,7 @@ function GroupDetailsPageContent(props: GroupDetailsProps & FetchGroupDetailsSta
857
859
) ;
858
860
}
859
861
860
- function GroupDetails ( props : GroupDetailsProps ) {
862
+ function GroupDetails ( ) {
861
863
const organization = useOrganization ( ) ;
862
864
const { group, ...fetchGroupDetailsProps } = useFetchGroupDetails ( ) ;
863
865
const isSampleError = useIsSampleEvent ( ) ;
@@ -895,7 +897,9 @@ function GroupDetails(props: GroupDetailsProps) {
895
897
shouldForceProject
896
898
>
897
899
{ config ?. showFeedbackWidget && < FloatingFeedbackWidget /> }
898
- < GroupDetailsPageContent { ...props } { ...fetchGroupDetailsProps } group = { group } />
900
+ < GroupDetailsPageContent { ...fetchGroupDetailsProps } group = { group } >
901
+ < Outlet />
902
+ </ GroupDetailsPageContent >
899
903
</ PageFiltersContainer >
900
904
</ SentryDocumentTitle >
901
905
</ Fragment >
0 commit comments