Use svelte way to retrieve params

This commit is contained in:
Roman Krček
2025-06-29 17:31:06 +02:00
parent a65cc90ae4
commit 26d6f77b43

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { page } from '$app/state';
let { data } = $props();
@@ -10,7 +11,8 @@
let notScannedCount: number = $state(0);
onMount(async () => {
const event_id = new URLSearchParams(window.location.search).get('id');
const event_id = page.url.searchParams.get('id');
if (!event_id) {
loading = false;
return;