Fix incorrect retrieval of event ID

This commit is contained in:
Roman Krček
2025-06-29 17:30:44 +02:00
parent 35da8d5b34
commit a65cc90ae4
2 changed files with 33 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { page } from '$app/state';
let { data } = $props();
@@ -7,7 +8,8 @@
let loading = $state(true);
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;