Skip to content

Commit 8659253

Browse files
committed
Fixed broken test
1 parent dc83c5f commit 8659253

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/routes/(v1)/url/+page.svelte

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
<script lang="ts">
2-
import type { PageData } from './$types.js';
32
import { goto } from '$app/navigation';
43
import { superForm } from '$lib/client/index.js';
54
import SuperDebug from '$lib/client/SuperDebug.svelte';
6-
import { onMount } from 'svelte';
75
8-
export let data: PageData;
6+
let { data } = $props();
97
108
const { form, errors, enhance } = superForm(data.form, {
11-
taintedMessage: null
12-
});
13-
14-
onMount(() => {
15-
form.subscribe((form) => {
16-
if (form.id) goto(`?id=${form.id}`);
17-
});
9+
taintedMessage: null,
10+
onChange(e) {
11+
const id = e.get('id');
12+
if (id) goto('?id=' + id);
13+
}
1814
});
1915
</script>
2016

0 commit comments

Comments
 (0)