@@ -45,6 +45,7 @@ export interface StateRouteProps {
45
45
const StateRoute = ( props : StateRouteProps ) => {
46
46
const { snapshot, hierarchy, snapshots, viewIndex } = props ;
47
47
48
+
48
49
const [ { tabs, currentTab } , dispatch ] = useStoreContext ( ) ;
49
50
const { hierarchy, sliderIndex, viewIndex } = tabs [ currentTab ] ;
50
51
const isRecoil = snapshot . atomsComponents ? true : false ;
@@ -71,13 +72,12 @@ const StateRoute = (props: StateRouteProps) => {
71
72
</ ParentSize >
72
73
) ;
73
74
}
74
- return < div className = " noState" > { NO_STATE_MSG } </ div > ;
75
+ return < div className = ' noState' > { NO_STATE_MSG } </ div > ;
75
76
} ;
76
77
77
78
// the hierarchy gets set on the first click in the page
78
79
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
79
- // if true involk render chart with hierarchy
80
- //* we wrap History in a ParentSize div, in order to make use of Visx's Zoom functionality
80
+ // if true invoke render chart with hierarchy
81
81
const renderHistory = ( ) => {
82
82
if ( hierarchy ) {
83
83
return ( < History
@@ -87,7 +87,7 @@ const StateRoute = (props: StateRouteProps) => {
87
87
viewIndex = { viewIndex }
88
88
/> )
89
89
}
90
- return < div className = " noState" > { NO_STATE_MSG } </ div > ;
90
+ return < div className = ' noState' > { NO_STATE_MSG } </ div > ;
91
91
} ;
92
92
93
93
const renderAtomsRelationship = ( ) => (
@@ -103,12 +103,12 @@ const StateRoute = (props: StateRouteProps) => {
103
103
104
104
// the hierarchy gets set on the first click in the page
105
105
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
106
- // if true involk render Tree with snapshot
106
+ // if true invoke render Tree with snapshot
107
107
const renderTree = ( ) => {
108
108
if ( hierarchy ) {
109
109
return < Tree snapshot = { snapshot } /> ;
110
110
}
111
- return < div className = " noState" > { NO_STATE_MSG } </ div > ;
111
+ return < div className = ' noState' > { NO_STATE_MSG } </ div > ;
112
112
} ;
113
113
114
114
const renderPerfView = ( ) => {
@@ -134,55 +134,55 @@ const StateRoute = (props: StateRouteProps) => {
134
134
// />
135
135
) ;
136
136
}
137
- return < div className = " noState" > { NO_STATE_MSG } </ div > ;
137
+ return < div className = ' noState' > { NO_STATE_MSG } </ div > ;
138
138
} ;
139
139
140
140
return (
141
141
< Router >
142
- < div className = " navbar" >
142
+ < div className = ' navbar' >
143
143
< NavLink
144
- className = " router-link"
145
- activeClassName = " is-active"
144
+ className = ' router-link'
145
+ activeClassName = ' is-active'
146
146
exact
147
- to = "/"
147
+ to = '/'
148
148
>
149
149
Tree
150
150
</ NavLink >
151
151
< NavLink
152
- className = " router-link"
153
- activeClassName = " is-active"
154
- to = " /history"
152
+ className = ' router-link'
153
+ activeClassName = ' is-active'
154
+ to = ' /history'
155
155
>
156
156
History
157
157
</ NavLink >
158
- < NavLink className = " router-link" activeClassName = " is-active" to = " /map" >
158
+ < NavLink className = ' router-link' activeClassName = ' is-active' to = ' /map' >
159
159
Map
160
160
</ NavLink >
161
161
162
162
{ isRecoil && (
163
163
< NavLink
164
- className = " router-link"
165
- activeClassName = " is-active"
166
- to = " /relationship"
164
+ className = ' router-link'
165
+ activeClassName = ' is-active'
166
+ to = ' /relationship'
167
167
>
168
168
AtomsRecoil
169
169
</ NavLink >
170
170
) }
171
171
172
172
< NavLink
173
- className = " router-link"
174
- activeClassName = " is-active"
175
- to = " /performance"
173
+ className = ' router-link'
174
+ activeClassName = ' is-active'
175
+ to = ' /performance'
176
176
>
177
177
Performance
178
178
</ NavLink >
179
179
</ div >
180
180
< Switch >
181
- < Route path = " /map" render = { renderComponentMap } />
182
- < Route path = " /history" render = { renderHistory } />
183
- < Route path = " /relationship" render = { renderAtomsRelationship } />
184
- < Route path = " /performance" render = { renderPerfView } />
185
- < Route path = "/" render = { renderTree } />
181
+ < Route path = ' /map' render = { renderComponentMap } />
182
+ < Route path = ' /history' render = { renderHistory } />
183
+ < Route path = ' /relationship' render = { renderAtomsRelationship } />
184
+ < Route path = ' /performance' render = { renderPerfView } />
185
+ < Route path = '/' render = { renderTree } />
186
186
</ Switch >
187
187
</ Router >
188
188
) ;
0 commit comments