make it backword compatible!

This commit is contained in:
RezHackXYZ 2025-06-03 13:28:27 +05:30
parent 5b9054272f
commit 3b254c1aa1
3 changed files with 85 additions and 47 deletions

View file

@ -2,7 +2,7 @@
import toast from "svelte-5-french-toast";
import { DefaultQuestions } from "$lib/config.js";
import { QuestionsData } from "./create.svelte";
import { QuestionsData, wait } from "./create.svelte";
import { createGame } from "./createGame.js";
let userInput = "";
@ -87,7 +87,13 @@ The user's topic of interest is:
<button class="btn flex items-center gap-1" onclick={() => GenerateQuestionsUsingAI()}>
<i class="nf nf-md-cpu_64_bit"></i> Generate Questions Using AI
</button>
<button class="btn flex items-center gap-1" onclick={() => createGame()}>
<i class="nf nf-md-play"></i> Start Game
</button>
{#if wait.v == true}
<button class="btn dull flex cursor-not-allowed items-center gap-1" disabled>
<i class="nf nf-md-play"></i> Creating Game
</button>
{:else}
<button class="btn flex items-center gap-1" onclick={() => createGame()}>
<i class="nf nf-md-play"></i> Start Game
</button>
{/if}
</div>