Skip to content

Commit 11a8bb2

Browse files
committed
cleaned up StateRoute file
1 parent 6eb02f3 commit 11a8bb2

File tree

1 file changed

+14
-28
lines changed

1 file changed

+14
-28
lines changed

src/app/components/StateRoute.tsx

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@ import {
1313
} from 'react-router-dom';
1414
import Tree from './Tree';
1515
import ComponentMap from './ComponentMap';
16-
<<<<<<< HEAD
17-
import AtomsRelationship from './AtomsRelationship.jsx';
18-
import PerformanceVisx from './PerformanceVisx';
19-
20-
=======
21-
>>>>>>> 2380810a0290431d0f1fed0a54a092fb7164b85a
2216
import { changeView, changeSlider } from '../actions/actions';
2317
import { useStoreContext } from '../store';
2418
import PerformanceVisx from './PerformanceVisx';
25-
import Legend from './AtomsRelationshipLegend'
19+
import Legend from './AtomsRelationshipLegend';
2620
import { ParentSize } from '@visx/responsive';
27-
import AtomsRelationship from './AtomsRelationship'
21+
import AtomsRelationship from './AtomsRelationship';
2822

2923
const History = require('./History').default;
3024
const ErrorHandler = require('./ErrorHandler').default;
@@ -50,13 +44,6 @@ export interface StateRouteProps {
5044

5145
const StateRoute = (props: StateRouteProps) => {
5246
const { snapshot, hierarchy, snapshots, viewIndex } = props;
53-
<<<<<<< HEAD
54-
const [{ tabs, currentTab }, dispatch] = useStoreContext();
55-
const { hierarchy, sliderIndex, viewIndex } = tabs[currentTab];
56-
=======
57-
58-
>>>>>>> 2380810a0290431d0f1fed0a54a092fb7164b85a
59-
6047
const [{ tabs, currentTab }, dispatch] = useStoreContext();
6148
const { hierarchy, sliderIndex, viewIndex } = tabs[currentTab];
6249
const isRecoil = snapshot.atomsComponents ? true : false;
@@ -70,15 +57,11 @@ const StateRoute = (props: StateRouteProps) => {
7057

7158
// Map
7259
const renderComponentMap = () => {
73-
7460
if (hierarchy) {
7561
return (
7662
<ParentSize>
7763
{({ width, height }) => (
78-
<ComponentMap
79-
snapshots={snapshots}
80-
width={width}
81-
height={height} />
64+
<ComponentMap snapshots={snapshots} width={width} height={height} />
8265
)}
8366
</ParentSize>
8467
);
@@ -104,14 +87,17 @@ const StateRoute = (props: StateRouteProps) => {
10487
};
10588

10689
const renderAtomsRelationship = () => (
107-
<ParentSize>{({ width, height }) =>
108-
<>
109-
<AtomsRelationship
110-
width={width}
111-
height={height}
112-
snapshots={snapshots} />
113-
</>
114-
}</ParentSize>
90+
<ParentSize>
91+
{({ width, height }) => (
92+
<>
93+
<AtomsRelationship
94+
width={width}
95+
height={height}
96+
snapshots={snapshots}
97+
/>
98+
</>
99+
)}
100+
</ParentSize>
115101
);
116102

117103
// the hierarchy gets set on the first click in the page

0 commit comments

Comments
 (0)