From 7f5ae50e22a03998d79c4b9c87a215014dafef8d Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Sat, 11 Sep 2021 22:22:55 +0100 Subject: [PATCH] Change layout of stats on test completion --- src/Progress.js | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/Progress.js b/src/Progress.js index 1d4bd68..5bdb06d 100644 --- a/src/Progress.js +++ b/src/Progress.js @@ -503,21 +503,23 @@ export default withRouter(class Progress extends React.Component {
{/* DONE */}

{this.state.setTitle}

-
-

You got

-

{`${(this.state.correct / this.state.totalQuestions * 100).toFixed(2)}%`}

-
-
-

{`${this.state.correct} of ${this.state.totalQuestions}`}

-

marks

-
-
-

You took

-

{this.msToTime(this.state.duration)}

-
-
-

Attempt #

-

{this.state.attemptNumber}

+
+
+

You got

+

{`${(this.state.correct / this.state.totalQuestions * 100).toFixed(2)}%`}

+
+
+

{`${this.state.correct} of ${this.state.totalQuestions}`}

+

marks

+
+
+

You took

+

{this.msToTime(this.state.duration)}

+
+
+

Attempt #

+

{this.state.attemptNumber}

+
{ this.state.incorrectAnswers && Object.keys(this.state.incorrectAnswers).length > 0 &&