Conditional rendering sticker
parent
b5c2517f6c
commit
e755b3d807
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue