feat(auth): add use:enhance and server error display to signup form

SignupForm now uses use:enhance for progressive enhancement.
Accepts form prop for server-side error display. Shows general
form errors in a banner and field-specific errors inline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 15:06:21 +02:00
parent bd9e1334e0
commit 6d0f00c8fb
3 changed files with 71 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
<script lang="ts">
import BrandPanel from '$lib/auth/BrandPanel.svelte';
import SignupForm from '$lib/auth/SignupForm.svelte';
let { form } = $props();
</script>
<svelte:head>
@@ -12,7 +14,7 @@
<BrandPanel />
<div class="flex flex-1 flex-col items-start justify-center px-[20px] py-[24px] md:items-center md:px-[56px] md:py-[48px]">
<div class="w-full max-w-[380px]">
<SignupForm />
<SignupForm {form} />
</div>
</div>
</div>