@@ -42,7 +42,6 @@ import {
42
42
type DispatchingReducerMiddleware ,
43
43
useDispatchingReducer ,
44
44
} from 'sentry/utils/useDispatchingReducer' ;
45
- import useOnClickOutside from 'sentry/utils/useOnClickOutside' ;
46
45
import useOrganization from 'sentry/utils/useOrganization' ;
47
46
import { useParams } from 'sentry/utils/useParams' ;
48
47
import useProjects from 'sentry/utils/useProjects' ;
@@ -718,33 +717,8 @@ function TraceViewContent(props: TraceViewContentProps) {
718
717
storeTraceViewPreferences ( traceState . preferences ) ;
719
718
} , [ traceState . preferences ] ) ;
720
719
721
- // Setup outside click handler so that we can clear the currently clicked node
722
- const onOutsideTraceContainerClick = useCallback ( ( ) => {
723
- if ( tree . type !== 'trace' ) {
724
- // Dont clear the URL in case the trace is still loading or failed for some reason,
725
- // we want to keep the eventId in the URL so the user can share the URL with support
726
- return ;
727
- }
728
- // we will drop eventId such that after users clicks outside and shares the URL
729
- const {
730
- node : _node ,
731
- eventId : _eventId ,
732
- ...queryParamsWithoutNode
733
- } = qs . parse ( location . search ) ;
734
-
735
- browserHistory . push ( {
736
- pathname : location . pathname ,
737
- query : queryParamsWithoutNode ,
738
- } ) ;
739
-
740
- traceDispatch ( { type : 'clear' } ) ;
741
- } , [ tree , traceDispatch ] ) ;
742
-
743
- const [ clickOutsideRef , setClickOutsideRef ] = useState < HTMLElement | null > ( null ) ;
744
720
const [ traceGridRef , setTraceGridRef ] = useState < HTMLElement | null > ( null ) ;
745
721
746
- useOnClickOutside ( clickOutsideRef , onOutsideTraceContainerClick ) ;
747
-
748
722
return (
749
723
< TraceExternalLayout >
750
724
< TraceUXChangeAlert />
@@ -763,7 +737,7 @@ function TraceViewContent(props: TraceViewContentProps) {
763
737
traces = { props . trace }
764
738
traceID = { props . traceSlug }
765
739
/>
766
- < TraceInnerLayout ref = { setClickOutsideRef } >
740
+ < TraceInnerLayout >
767
741
< TraceToolbar >
768
742
< TraceSearchInput
769
743
trace_state = { traceState }
0 commit comments