@@ -17,12 +17,10 @@ import {
1717} from '../actions/actions' ;
1818import { useStoreContext } from '../store' ;
1919
20- //Must be required in. This enables compatibility with TS. If imported in, throws ts error of not rendering steps as a class component correctly.
21- const Split = require ( 'react-split' ) ;
2220
2321function MainContainer ( ) : JSX . Element {
2422 const [ store , dispatch ] = useStoreContext ( ) ;
25- const { tabs, currentTab, port, split } = store ;
23+ const { tabs, currentTab, port } = store ;
2624 const [ actionView , setActionView ] = useState ( true ) ;
2725 // this function handles Time Jump sidebar view
2826 const toggleActionContainer = ( ) => {
@@ -148,54 +146,6 @@ function MainContainer(): JSX.Element {
148146 const snapshotDisplay = statelessCleaning ( snapshotView ) ;
149147 const hierarchyDisplay = statelessCleaning ( hierarchy ) ;
150148
151- function handleSplit ( currentSplitMode : boolean ) : JSX . Element {
152- if ( ! currentSplitMode ) {
153- return (
154- < div className = 'state-container-container' >
155- < StateContainer
156- webMetrics = { webMetrics }
157- viewIndex = { viewIndex }
158- snapshot = { snapshotDisplay }
159- hierarchy = { hierarchyDisplay }
160- snapshots = { snapshots }
161- currLocation = { currLocation }
162- />
163- </ div >
164- ) ;
165- }
166- return (
167- < Split
168- sizes = { [ 50 , 50 ] }
169- minSize = { 200 }
170- snapOffset = { 1 }
171- className = 'split'
172- gutterStyle = { function ( ) {
173- return {
174- backgroundColor : 'dimgrey' ,
175- width : '8px' ,
176- } ;
177- } }
178- >
179- < StateContainer
180- webMetrics = { webMetrics }
181- viewIndex = { viewIndex }
182- snapshot = { snapshotDisplay }
183- hierarchy = { hierarchyDisplay }
184- snapshots = { snapshots }
185- currLocation = { currLocation }
186- />
187- < StateContainer
188- webMetrics = { webMetrics }
189- viewIndex = { viewIndex }
190- snapshot = { snapshotDisplay }
191- hierarchy = { hierarchyDisplay }
192- snapshots = { snapshots }
193- currLocation = { currLocation }
194- />
195- </ Split >
196- ) ;
197- }
198-
199149 return (
200150 < div className = 'main-container' >
201151 < div id = 'bodyContainer' className = 'body-container' >
@@ -204,7 +154,17 @@ function MainContainer(): JSX.Element {
204154 setActionView = { setActionView }
205155 toggleActionContainer = { toggleActionContainer }
206156 />
207- { snapshots . length ? handleSplit ( split ) : null }
157+ { snapshots . length ?
158+ < div className = 'state-container-container' >
159+ < StateContainer
160+ webMetrics = { webMetrics }
161+ viewIndex = { viewIndex }
162+ snapshot = { snapshotDisplay }
163+ hierarchy = { hierarchyDisplay }
164+ snapshots = { snapshots }
165+ currLocation = { currLocation }
166+ />
167+ </ div > : null }
208168 < TravelContainer snapshotsLength = { snapshots . length } />
209169 < ButtonsContainer />
210170 </ div >
0 commit comments