Added chapter guess challenge

This commit is contained in:
George Powell
2026-01-04 16:36:28 -05:00
parent 0f6870344f
commit 1b1bc7bd3c
5 changed files with 326 additions and 19 deletions

View File

@@ -4,6 +4,7 @@
import { onMount } from "svelte";
import Container from "./Container.svelte";
import CountdownTimer from "./CountdownTimer.svelte";
import ChapterGuess from "./ChapterGuess.svelte";
interface StatsData {
solveRank: number;
@@ -26,6 +27,8 @@
copied = $bindable(false),
statsSubmitted,
guessCount,
reference,
onChapterGuessCompleted,
} = $props();
let bookName = $derived(getBookById(correctBookId)?.name ?? "");
@@ -128,11 +131,22 @@
{/if}
</div>
<p class="pt-6 big-text text-gray-700!">
{getNextGradeMessage(guessCount)}
</p>
{#if guessCount !== 1}
<p class="pt-6 big-text text-gray-700!">
{getNextGradeMessage(guessCount)}
</p>
{/if}
</Container>
<!-- S++ Bonus Challenge for first try -->
{#if guessCount === 1}
<ChapterGuess
{reference}
bookId={correctBookId}
onCompleted={onChapterGuessCompleted}
/>
{/if}
<CountdownTimer />
<!-- Statistics Display -->