mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 21:33:08 +01:00
Added a button to start the first scan
This commit is contained in:
@@ -37,6 +37,9 @@ export default class LatestResults extends Component {
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
this.setState({
|
||||
data: false
|
||||
});
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
@@ -64,7 +67,7 @@ export default class LatestResults extends Component {
|
||||
var loading = this.state.loading;
|
||||
var data = this.state.data;
|
||||
|
||||
if(loading) {
|
||||
if(loading && data !== false) {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Row>
|
||||
@@ -74,6 +77,18 @@ export default class LatestResults extends Component {
|
||||
</Row>
|
||||
</Container>
|
||||
);
|
||||
} else if(data === false) {
|
||||
return (
|
||||
<Container fluid>
|
||||
<Row>
|
||||
<Col sm={{ span: 12 }} className="text-center">
|
||||
<div>
|
||||
<Button variant="primary" onClick={this.newScan}>Start your first scan!</Button>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Container fluid>
|
||||
|
||||
Reference in New Issue
Block a user