@@ -34,10 +34,6 @@ import {
3434 SuspenseTreeStateContext ,
3535} from './SuspenseTreeContext' ;
3636import { StoreContext , OptionsContext } from '../context' ;
37- import {
38- TreeDispatcherContext ,
39- TreeStateContext ,
40- } from '../Components/TreeContext' ;
4137import Button from '../Button' ;
4238import Toggle from '../Toggle' ;
4339import typeof { SyntheticPointerEvent } from 'react-dom-bindings/src/events/SyntheticEvent' ;
@@ -185,18 +181,6 @@ function SuspenseTab(_: {}) {
185181 treeListHorizontalFraction,
186182 } = state ;
187183
188- const { inspectedElementID} = useContext ( TreeStateContext ) ;
189- const { timeline} = useContext ( SuspenseTreeStateContext ) ;
190- const treeDispatch = useContext ( TreeDispatcherContext ) ;
191- useLayoutEffect ( ( ) => {
192- // If the inspected element is still null and we've loaded a timeline, we can set the initial selection.
193- // TODO: This tab should use its own source of truth instead so we only show suspense boundaries.
194- if ( inspectedElementID === null && timeline . length > 0 ) {
195- const milestone = timeline [ timeline . length - 1 ] ;
196- treeDispatch ( { type : 'SELECT_ELEMENT_BY_ID' , payload : milestone } ) ;
197- }
198- } , [ timeline , inspectedElementID ] ) ;
199-
200184 useLayoutEffect ( ( ) => {
201185 const wrapperElement = wrapperTreeRef . current ;
202186
0 commit comments