@sage-rsc/talking-head-react 1.0.58 → 1.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +318 -313
- package/package.json +1 -1
- package/src/components/CurriculumLearning.jsx +5 -1
package/package.json
CHANGED
|
@@ -185,7 +185,11 @@ const CurriculumLearning = forwardRef(({
|
|
|
185
185
|
: 100;
|
|
186
186
|
let feedbackMessage = `Congratulations! You've completed this lesson`;
|
|
187
187
|
if (stateRef.current.totalQuestions > 0) {
|
|
188
|
-
|
|
188
|
+
// Rephrase for clearer TTS: "You got X correct out of Y questions, which is Z percent"
|
|
189
|
+
const scoreText = stateRef.current.score === 1 ? 'one' : stateRef.current.score;
|
|
190
|
+
const totalText = stateRef.current.totalQuestions === 1 ? 'one' : stateRef.current.totalQuestions;
|
|
191
|
+
const percentText = percentage === 50 ? 'fifty' : `${percentage}`;
|
|
192
|
+
feedbackMessage += ` You got ${scoreText} correct out of ${totalText} question${stateRef.current.totalQuestions === 1 ? '' : 's'}, which is ${percentText} percent. `;
|
|
189
193
|
} else {
|
|
190
194
|
feedbackMessage += `! `;
|
|
191
195
|
}
|