diff --git a/src/App.tsx b/src/App.tsx index 0728518..ab52003 100755 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,7 @@ import './App.css'; */ interface IState { data: ServerRespond[], + showGraph: boolean, } /** @@ -21,7 +22,8 @@ class App extends Component<{}, IState> { this.state = { // data saves the server responds. // We use this state to parse data down to the child element (Graph) as element property - data: [], + data: [], + showGraph: false, }; } @@ -29,7 +31,9 @@ class App extends Component<{}, IState> { * Render Graph react component with state.data parse as property data */ renderGraph() { + if (this.state.showGraph) { return () + } } /**