Skip to content

Commit 0789980

Browse files
committed
review comments
1 parent e5954ea commit 0789980

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/app/components/StateRoute.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,29 @@ interface StateRouteProps {
2424

2525
const StateRoute = (props:StateRouteProps) => {
2626
const { snapshot, hierarchy, snapshots, viewIndex } = props;
27-
// gabi :: the hierarchy get set on the first click in the page, when page in refreshed we don't have a hierarchy so we need to check if hierarchy was initialize involk render chart
27+
// the hierarchy gets set on the first click in the page
28+
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
29+
// if true involk render chart with hierarchy
2830
const renderChart = () => {
2931
if (hierarchy) {
3032
return <Chart hierarchy={hierarchy} />;
3133
}
3234
return <div className="noState">{NO_STATE_MSG}</div>;
3335
};
3436

35-
// gabi :: the hierarchy get set on the first click in the page, when page in refreshed we don't have a hierarchy so we need to check if snapshot was initialize involk render chart
37+
// the hierarchy gets set on the first click in the page
38+
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
39+
// if true involk render Tree with snapshot
3640
const renderTree = () => {
3741
if (hierarchy) {
3842
return <Tree snapshot={snapshot} />;
3943
}
4044
return <div className="noState">{NO_STATE_MSG}</div>;
4145
};
4246

47+
// the hierarchy gets set on the first click in the page
48+
// when the page is refreshed we may not have a hierarchy, so we need to check if hierarchy was initialized
49+
// if true involk render Performance graphic with snapshots
4350
const renderPerfView = () => {
4451
if (hierarchy) {
4552
return (

0 commit comments

Comments
 (0)