mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 13:23:04 +01:00
Fix issue where the data would refresh before the react state had updated
This commit is contained in:
10940
public/css/app.css
vendored
10940
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
150239
public/js/app.js
vendored
150239
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -6,14 +6,14 @@ object-assign
|
|||||||
|
|
||||||
/* @license
|
/* @license
|
||||||
Papa Parse
|
Papa Parse
|
||||||
v5.2.0
|
v5.3.0
|
||||||
https://github.com/mholt/PapaParse
|
https://github.com/mholt/PapaParse
|
||||||
License: MIT
|
License: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap v4.5.3 (https://getbootstrap.com/)
|
* Bootstrap v4.6.0 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ License: MIT
|
|||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @license React v0.19.1
|
/** @license React v0.20.1
|
||||||
* scheduler.production.min.js
|
* scheduler.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
@@ -90,7 +90,7 @@ License: MIT
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @license React v16.14.0
|
/** @license React v17.0.1
|
||||||
* react-dom.production.min.js
|
* react-dom.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
@@ -99,7 +99,7 @@ License: MIT
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @license React v16.14.0
|
/** @license React v17.0.1
|
||||||
* react.production.min.js
|
* react.production.min.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
|||||||
3
resources/js/components/Home/HomePage.js
vendored
3
resources/js/components/Home/HomePage.js
vendored
@@ -38,10 +38,9 @@ export default class HomePage extends Component {
|
|||||||
|
|
||||||
updateDays = (days) => {
|
updateDays = (days) => {
|
||||||
this.setState({ days: days });
|
this.setState({ days: days });
|
||||||
this.getData();
|
this.setState({ days: days }, () => { this.getData() });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getData = () => {
|
getData = () => {
|
||||||
axios.get('api/speedtest/home/' + this.state.days)
|
axios.get('api/speedtest/home/' + this.state.days)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user