fix: scope option disable logic

This commit is contained in:
ittoview
2026-05-13 19:36:00 +01:00
parent 643aeb498d
commit ae7391ecab

View File

@@ -328,8 +328,13 @@ export default function PerformanceDomainPracticePage() {
const expectedGoalDone = expectedGoalProgress.total > 0 && expectedGoalProgress.completed >= expectedGoalProgress.total
const keyPointDone = keyPointProgress.total > 0 && keyPointProgress.completed >= keyPointProgress.total
const domainDone = expectedGoalDone && keyPointDone
const shouldKeepDisabled = domainDone && !shouldHighlightCorrect && !isWrongSelected
const optionDisabled = isAnswerShown || domainDone
const scopedDone = progress.scope === 'expectedGoal'
? expectedGoalDone
: progress.scope === 'keyPoint'
? keyPointDone
: domainDone
const shouldKeepDisabled = scopedDone && !shouldHighlightCorrect && !isWrongSelected
const optionDisabled = isAnswerShown || scopedDone
return (
<motion.button