This commit is contained in:
Antti Pilto 2018-11-17 16:16:32 +02:00
parent f6bc13bfb9
commit dab55e029f

View file

@ -229,14 +229,16 @@ class Question extends Component {
{this.getPreviousResult()} {this.getPreviousResult()}
<div className="big-character">{this.getShowableQuestion()}</div> <div className="big-character">{this.getShowableQuestion()}</div>
<div className="answer-container"> <div className="answer-container">
{this.props.stage<3?this.state.answerOptions.map(function(answer, idx) { {
return <AnswerButton answer={answer} this.props.stage<3 ?
className={btnClass} this.state.answerOptions.map((answer, idx) => {
key={idx} return <AnswerButton answer={answer}
answertype={this.getAnswerType()} className={btnClass}
handleAnswer={this.handleAnswer} /> key={idx}
}, this): answertype={this.getAnswerType()}
<div className="answer-form-container"> handleAnswer={this.handleAnswer} />
})
: <div className="answer-form-container">
<form onSubmit={this.handleSubmit}> <form onSubmit={this.handleSubmit}>
<input autoFocus className="answer-input" type="text" value={this.state.currentAnswer} onChange={this.handleAnswerChange} /> <input autoFocus className="answer-input" type="text" value={this.state.currentAnswer} onChange={this.handleAnswerChange} />
</form> </form>