From fb16a42eb5150ab35c0dfcf43d98075002a29381 Mon Sep 17 00:00:00 2001 From: Henriette Rudi Moe Date: Wed, 3 May 2023 18:39:25 +0200 Subject: [PATCH] use overallFeedback --- src/components/ScorePage/ScorePage.tsx | 9 +++++++-- src/components/VocabularyDrill/VocabularyDrill.tsx | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/ScorePage/ScorePage.tsx b/src/components/ScorePage/ScorePage.tsx index d42c4f3e..2402b32d 100644 --- a/src/components/ScorePage/ScorePage.tsx +++ b/src/components/ScorePage/ScorePage.tsx @@ -1,28 +1,33 @@ +import { H5P } from 'h5p-utils'; import React, { FC } from 'react'; import { ScoreBar } from "../ScoreBar/ScoreBar"; type ScorePageProps = { score: number; maxScore: number; + overallFeedbacks: {}[] | undefined; onRestart: () => void; }; export const ScorePage: FC = ({ score, maxScore, + overallFeedbacks, onRestart, }) => { // TODO: fix label, helpText, and scoreExplanation // TODO: translate 'Restart' + const overallFeedback = (H5P as any).Question.determineOverallFeedback(overallFeedbacks, score / maxScore) ?? 'Your score is'; return (
-

Great job!

+

{overallFeedback}

+ scoreExplanation='' + />