From e5ecac5ce95ee50e6493f654165ed22191b123c1 Mon Sep 17 00:00:00 2001 From: ayshiff Date: Wed, 6 Jun 2018 11:32:40 +0200 Subject: [PATCH] Fix cache issues --- client/src/components/App.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/components/App.js b/client/src/components/App.js index db2c7c3..7556a2a 100644 --- a/client/src/components/App.js +++ b/client/src/components/App.js @@ -50,7 +50,7 @@ class App extends Component { score: 0 }); - axios.get(this.state.baseRoute+"/questions") + axios.get(this.state.baseRoute+"/questions" +"?q="+new Date().getTime()) .then(((data) => { this.fetchQuestion(this.state.baseRoute+"/questions/"+data.data[0].id); this.fetchResponses(this.state.baseRoute+"/questions/"+data.data[0].id+"/responses"); @@ -74,7 +74,7 @@ class App extends Component { } fetchQuestion(url) { - axios.get(url) + axios.get(url +"?q="+new Date().getTime()) .then(((data) => { console.log(data.data); this.setState({ @@ -86,7 +86,7 @@ class App extends Component { } fetchResponses(url) { - axios.get(url) + axios.get(url +"?q="+new Date().getTime()) .then(((data) => { this.setState({ currentResponses : data.data @@ -96,7 +96,7 @@ class App extends Component { componentWillMount(){ if(this.state.start === true) { - axios.get(this.state.baseRoute+"/questions") + axios.get(this.state.baseRoute+"/questions" +"?q="+new Date().getTime()) .then(((data) => { this.fetchQuestion(this.state.baseRoute+"/questions/"+data.data[0].id); this.fetchResponses(this.state.baseRoute+"/questions/"+data.data[0].id+"/responses"); @@ -142,7 +142,7 @@ class App extends Component {

{this.state.currentQuestion}

{this.state.currentSticker ? - + : null}
{this.state.currentResponses ? currentOptions : null}