Skip to content

Commit 7556941

Browse files
fix(Quiz): fix missing token updates
1 parent a654952 commit 7556941

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/components/Quiz/QuizRadioGroup.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ const QuizRadioGroup: React.FC<IProps> = ({
7070
const buttonBg = useMemo<string>(() => {
7171
if (!state.isChecked) return "body.inverted"
7272
if (!showAnswer) return "primary.base"
73-
if (!isSelectedCorrect) return "error"
74-
return "success"
73+
if (!isSelectedCorrect) return "error.base"
74+
return "success.base"
7575
}, [state.isChecked, showAnswer, isSelectedCorrect])
7676

7777
// Render CustomRadio component
@@ -90,7 +90,7 @@ const QuizRadioGroup: React.FC<IProps> = ({
9090
boxShadow: showAnswer ? "none" : "primary.base",
9191
outline: showAnswer
9292
? "none"
93-
: "1px solid var(--eth-colors-primary)",
93+
: "1px solid var(--eth-colors-primary-base)",
9494
cursor: showAnswer ? "default" : "pointer",
9595
}}
9696
>
@@ -113,7 +113,11 @@ const QuizRadioGroup: React.FC<IProps> = ({
113113
fontWeight="700"
114114
fontSize="lg"
115115
color={
116-
!showAnswer ? "white" : isSelectedCorrect ? "success" : "error"
116+
!showAnswer
117+
? "white"
118+
: isSelectedCorrect
119+
? "success.base"
120+
: "error.base"
117121
}
118122
>
119123
{String.fromCharCode(97 + index).toUpperCase()}

src/components/Quiz/QuizWidget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ const QuizWidget: React.FC<IProps> = ({ quizKey, maxQuestions }) => {
118118
currentQuestionAnswerChoice?.isCorrect) ||
119119
userQuizProgress[index]?.isCorrect
120120
)
121-
return "success"
121+
return "success.base"
122122
if (
123123
(showAnswer &&
124124
index === currentQuestionIndex &&
125125
!currentQuestionAnswerChoice?.isCorrect) ||
126126
(userQuizProgress[index] && !userQuizProgress[index].isCorrect)
127127
)
128-
return "error"
128+
return "error.base"
129129
if (index === currentQuestionIndex) return "gray.400"
130130
return "gray.500"
131131
},

0 commit comments

Comments
 (0)