Added loading msg
This commit is contained in:
parent
3f90d6f926
commit
2e22260777
@ -13,6 +13,7 @@ export default class Home extends Component {
|
|||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
|
loading: true,
|
||||||
steamId: undefined,
|
steamId: undefined,
|
||||||
isPreviewVisible: false,
|
isPreviewVisible: false,
|
||||||
previewUrl: undefined,
|
previewUrl: undefined,
|
||||||
@ -46,6 +47,7 @@ export default class Home extends Component {
|
|||||||
const json = JSON.parse(localStorage.getItem('values'))
|
const json = JSON.parse(localStorage.getItem('values'))
|
||||||
this.setState({ steamId: json.steamId, values: json.values });
|
this.setState({ steamId: json.steamId, values: json.values });
|
||||||
}
|
}
|
||||||
|
this.setState({ loading: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPreview() {
|
loadPreview() {
|
||||||
@ -85,7 +87,8 @@ export default class Home extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <div className={styles.main}>
|
return this.state.loading ? <h1>Loading...</h1> :
|
||||||
|
<div className={styles.main}>
|
||||||
<NavBar></NavBar>
|
<NavBar></NavBar>
|
||||||
|
|
||||||
<Container css={{
|
<Container css={{
|
||||||
@ -184,5 +187,5 @@ export default class Home extends Component {
|
|||||||
|
|
||||||
<ToastContainer />
|
<ToastContainer />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user