diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte index 3ad77a8..ef2e5a8 100644 --- a/src/routes/contact/+page.svelte +++ b/src/routes/contact/+page.svelte @@ -8,13 +8,17 @@ let submitted = false; let error = ''; - const handleSubmit: SubmitFunction = ({}) => { + const handleSubmit: SubmitFunction = () => { + let loading = false; return async ({ result, update }) => { + loading = true; if (result.data && result.data.success) { submitted = true; } else { error = result.error?.message || 'Form submission failed'; } + loading = false; + await update(); }; };