Updated to Svelte 5

This commit is contained in:
Mawoka
2025-09-21 12:42:04 +02:00
parent fa533257b3
commit a88cf13f82
137 changed files with 2279 additions and 1948 deletions
@@ -8,8 +8,12 @@ SPDX-License-Identifier: MPL-2.0
import type { Question } from '$lib/quiz_types';
import { QuizQuestionType } from '$lib/quiz_types';
export let data;
export let question: Question;
interface Props {
data: any;
question: Question;
}
let { data, question }: Props = $props();
let quiz_answers = [];
let quiz_colors = [];
@@ -21,7 +25,7 @@ SPDX-License-Identifier: MPL-2.0
answer_correct.push(i.right);
}
let sorted_data = {};
let sorted_data = $state({});
for (const i of quiz_answers) {
sorted_data[i] = 0;
}
@@ -56,7 +60,7 @@ SPDX-License-Identifier: MPL-2.0
data.length}rem; background-color: {quiz_colors[i]
? quiz_colors[i]
: 'black'}"
/>
></div>
{/each}
</div>
<div class="flex gap-12">