Conditional rendering sticker

pull/19/head
ayshiff 2018-06-06 10:43:48 +02:00
parent b5c2517f6c
commit e755b3d807
1 changed files with 3 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class App extends Component {
score: this.state.score+1
});
this.fetchQuestion(this.state.baseRoute + element.child);
this.fetchResponses(this.state.baseRoute + element.child+"/responses");
this.fetchResponses(this.state.baseRoute + element.child+"/responses");
} else {
this.setState({
modalIsOpen: true
@ -142,7 +142,9 @@ class App extends Component {
<div className="jumbotron">
<div className="currentSection vertical-center container">
<h1 className="currentState">{this.state.currentQuestion}</h1>
{this.state.currentSticker ?
<img src={this.state.currentSticker} height="92" width="92" />
:null}
<h2 className="currentQuestion">Je fais quoi ?</h2>
<div className="currentOptions">
{this.state.currentResponses ? currentOptions : null}