fixed bug where the buttons dont go back to orginal sate if it failed and made the var into $satate

This commit is contained in:
RezHackXYZ 2025-06-01 13:14:14 +05:30
parent 169022e802
commit 3e3fad5c83
2 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@
let props = $props();
let index = props.index;
let files;
let files = $state();
</script>
<div class="flex items-center gap-3">

View file

@ -19,8 +19,8 @@ export async function createGame(questions, gamePin) {
});
if (gameError) {
return;
Wait.v = false;
return;
}
// Prepare questions and answers for batch insertion
@ -47,8 +47,9 @@ export async function createGame(questions, gamePin) {
);
if (questionsError) {
return;
Wait.v = false;
return;
}
const answersData = [];
@ -71,8 +72,8 @@ export async function createGame(questions, gamePin) {
});
if (answersError) {
Wait.v = false
return;
Wait.v = false;
}
window.location.href = `/kahootclone/host?gamepin=${gamePin}`;