diff --git a/src/components/challenge-modal/challenge-modal.tsx b/src/components/challenge-modal/challenge-modal.tsx index 4a1790ba..11aebae8 100644 --- a/src/components/challenge-modal/challenge-modal.tsx +++ b/src/components/challenge-modal/challenge-modal.tsx @@ -45,6 +45,7 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => { const onEnterKey = (e: React.KeyboardEvent) => { if (e.key !== 'Enter') return; + if (!answers[currentChallengeIndex]) return; if (challenges[currentChallengeIndex + 1]) { setCurrentChallengeIndex((prev) => prev + 1); } else { @@ -112,7 +113,11 @@ const Challenge = ({ challenge, closeModal }: ChallengeProps) => {
{t('challenge_counter', { index: currentChallengeIndex + 1, total: challenges?.length })}
- {!challenges[currentChallengeIndex + 1] && } + {!challenges[currentChallengeIndex + 1] && ( + + )} {challenges.length > 1 && (