Skip to content

Commit

Permalink
Merge pull request #70 from bitesinbyte/feature/63-feature-question-c…
Browse files Browse the repository at this point in the history
…ontext

chore: Fixed issues with ui
  • Loading branch information
manishtiwari25 authored Feb 11, 2025
2 parents 0b08479 + 6cff584 commit 14e359c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/app/web/components/prepare-quiz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,15 @@ export default function PrepareQuiz({ originalQuestions, user, prepareQuestion }
&& user.questionProgress[currentQuestionIndex].answerSelected !== ""
&& user.questionProgress[currentQuestionIndex].answeredCorrectly) {
setShowSolution(true);
setNextEnabled(true);
}
setOptionSelected(user.questionProgress[currentQuestionIndex].answerSelected);
if (user.questionProgress[currentQuestionIndex].answeredCorrectly) {
setSubmitDisabled(true);
setNextEnabled(true);
}
setFlagPressed(user.questionProgress[currentQuestionIndex].flagged);
}
setNextEnabled(true);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentAction, currentQuestion]);
Expand Down Expand Up @@ -420,7 +421,7 @@ export default function PrepareQuiz({ originalQuestions, user, prepareQuestion }
<Tooltip content="Flag for review">
<Button onPress={handleFlag} disableRipple variant="light" className={`dark:invert ${flagPressed ? "text-red-600" : "text-white"}`} style={{ backgroundColor: 'transparent' }} startContent={<FlagIcon />} />
</Tooltip>
<Button variant="solid" color="primary" onPress={handleSubmit} disabled={submitDisabled}>Submit</Button>
{!nextEnabled && <Button variant="solid" color="primary" onPress={handleSubmit} disabled={submitDisabled}>Submit</Button>}
{nextEnabled && <Button disabled={!nextEnabled} variant="solid" color="primary" onPress={handleNext}>Next</Button>}
</div>
</CardFooter>
Expand Down
4 changes: 2 additions & 2 deletions src/app/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leben-in-deutschland",
"version": "1.10.0",
"version": "1.10.1",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down

0 comments on commit 14e359c

Please sign in to comment.