Skip to content

Commit

Permalink
Refactor quiz navigation to utilize dynamic question types from the Q…
Browse files Browse the repository at this point in the history
…uestionType model, enhancing maintainability and consistency. This change replaces hardcoded question types with a more flexible approach, improving the overall structure of the navigation links.
  • Loading branch information
Malte2036 committed Jan 22, 2025
1 parent 249cd9e commit a524c8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { bannerMessage } from '$lib/shared/stores/bannerMessage';
import { onMount } from 'svelte';
import { navigationItems } from '$lib/shared/navigation';
import { QuestionType } from '$lib/model/question';
const description = {
headline: 'Inoffizielle Tools für THW-Helfer:',
Expand Down Expand Up @@ -118,7 +119,8 @@
<a href="/quiz/stats/" class="hidden" />
<!-- svelte-ignore a11y-missing-content -->
<a href="/faq" class="hidden" />
{#each ['ga', 'agt', 'cbrn'] as questionType}

{#each Object.values(QuestionType) as questionType}
<!-- svelte-ignore a11y-missing-content -->
<a href={`/quiz/${questionType}/`} class="hidden" />
<!-- svelte-ignore a11y-missing-content -->
Expand Down

0 comments on commit a524c8d

Please sign in to comment.