Skip to content

Commit

Permalink
Merge pull request #29 from Villy-P/3-fix-timer-still-going-on-the-di…
Browse files Browse the repository at this point in the history
…agnostic-page

Fix Timer not ending when going to diagnostic page
  • Loading branch information
Villy-P authored Feb 1, 2025
2 parents c150005 + 3476b0c commit f816823
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/question.html/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
{/if}
<div class="flex w-full justify-center items-center flex-col">
{#if correct == 1}
<div class="w-11/12 bg-green-500 rounded-lg text-gray-100">
<div class="w-11/12 bg-green-500 rounded-lg text-gray-100 mb-4">
<p class="p-4 font-semibold">That's the correct answer! Good job</p>
</div>
<Button on:click={(e) => getNewQuestion()} color="blue">Next Question</Button>
Expand All @@ -133,8 +133,8 @@
<p class="p-4 pt-0">{currentQuestion.answers[currentQuestion.answer]}</p>
<p class="p-4 pt-1">Explanation: {currentQuestion.explanation}</p>
</div>
{#if $quickQuiz.currentQuestion == $quickQuiz.questionCount}
<Button href="/diagnostics.html" color="blue" class="float-right mt-4">Finish Quiz</Button>
{#if $quickQuiz.currentQuestion >= $quickQuiz.questionCount}
<Button on:click={() => clearInterval(interval)} href="/diagnostics.html" color="blue" class="float-right mt-4">Finish Quiz</Button>
{:else}
<Button on:click={(e) => getNewQuestion()} color="blue" class="float-right mt-4">Next Question</Button>
{/if}
Expand Down

0 comments on commit f816823

Please sign in to comment.