From e1afdd16ced045be4256945098c076fd8b6d1b97 Mon Sep 17 00:00:00 2001 From: andrewtan2000 Date: Tue, 24 Sep 2024 01:14:50 +0800 Subject: [PATCH] Update Results --- components/ResultsBottom.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/components/ResultsBottom.tsx b/components/ResultsBottom.tsx index 78d631e..92dea3f 100644 --- a/components/ResultsBottom.tsx +++ b/components/ResultsBottom.tsx @@ -38,10 +38,11 @@ export default function ResultsBottomComponent({ currentQuestionIndex, quiz }: R {currentQuestion.options && currentQuestion.options.map((option: Quiz.Option, index: number) => { const isAttempted = option.no === currentQuestion.attemptOption; - const isAttemptedAndIsAnswer = isAttempted && option.isAnswer; // Black + const isAttemptedAndIsAnswer = isAttempted && option.isAnswer; // Green const isAttemptedAndIsNotAnswer = isAttempted && !option.isAnswer; // Red + const isAllUnattempted = currentQuestion.attemptOption === 0; // Gray const isNotAttemptedAndIsAnswer = !isAttempted && option.isAnswer; // Green - const isAllUnattempted = currentQuestion.attemptOption === 0; // All options + const isNotAttemptedAndIsNotAnswer = !isAttempted && !option.isAnswer; // Gray return ( );