Minor formatting

This commit is contained in:
2022-08-29 16:48:38 +01:00
parent 0127f55401
commit eed97b0298

View File

@@ -628,7 +628,7 @@ export default withRouter(class Progress extends React.Component {
const progressId = result.data; const progressId = result.data;
this.stopLoading(); this.stopLoading();
this.props.history.push("/progress/" + progressId); this.props.history.push("/progress/" + progressId);
this.setState({ this.setState({
incorrectAnswers: {}, incorrectAnswers: {},
}); });
@@ -742,33 +742,35 @@ export default withRouter(class Progress extends React.Component {
<div className="correct-answers"> <div className="correct-answers">
{ {
this.state.currentCorrect && this.state.currentCorrect.length > 0 this.state.currentCorrect && this.state.currentCorrect.length > 0
? ?
<> <>
<h2> <h2>
{ {
this.state.moreAnswers this.state.moreAnswers
? ?
this.state.numberOfAnswers !== null this.state.numberOfAnswers !== null
? ?
`${this.state.currentCorrect.length} of ${this.state.numberOfAnswers} correct so far:` `${this.state.currentCorrect.length} of ${this.state.numberOfAnswers} correct so far:`
: :
"Correct so far:" "Correct so far:"
: :
"Answers:" "Answers:"
} }
</h2> </h2>
{this.state.currentCorrect.map((vocab, index) =>
{this.state.currentCorrect.map((vocab, index) => {this.state.currentCorrect.map((vocab, index) =>
<p key={index}>{vocab}</p> {this.state.currentCorrect.map((vocab, index) =>
)} <p key={index}>{vocab}</p>
</> )}
: </>
:
this.state.numberOfAnswers !== null this.state.numberOfAnswers !== null
? ?
<h2> <h2>
{this.state.currentCorrect.length} of {this.state.numberOfAnswers} correct so far {this.state.currentCorrect.length} of {this.state.numberOfAnswers} correct so far
</h2> </h2>
: :
"" ""
} }
</div> </div>
</div> </div>