Commit c2c6113f authored by wildfirecode13's avatar wildfirecode13

1

parent dca34cb3
...@@ -16,16 +16,16 @@ class App extends Component { ...@@ -16,16 +16,16 @@ class App extends Component {
}; };
} }
navigateTo=(page,pagedata) =>{ navigateTo = (page, pagedata) => {
this.setState({page, pagedata}) this.setState({ page, pagedata })
} }
render() { render() {
const {page,pagedata} = this.state; const { page, pagedata } = this.state;
return ( return (
<div> <div>
{page=='loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>} {page == 'loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>}
{page=='mainpage' && <Mainpage data={pagedata} navigateTo={this.navigateTo}></Mainpage>} {page == 'mainpage' && <Mainpage data={pagedata} navigateTo={this.navigateTo}></Mainpage>}
</div> </div>
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment