Commit c2c6113f authored by wildfirecode13's avatar wildfirecode13

1

parent dca34cb3
......@@ -16,16 +16,16 @@ class App extends Component {
};
}
navigateTo=(page,pagedata) =>{
this.setState({page, pagedata})
navigateTo = (page, pagedata) => {
this.setState({ page, pagedata })
}
render() {
const {page,pagedata} = this.state;
const { page, pagedata } = this.state;
return (
<div>
{page=='loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>}
{page=='mainpage' && <Mainpage data={pagedata} navigateTo={this.navigateTo}></Mainpage>}
{page == 'loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>}
{page == 'mainpage' && <Mainpage data={pagedata} navigateTo={this.navigateTo}></Mainpage>}
</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