feat:move auth demo to main

This commit is contained in:
2025-09-27 13:59:37 +02:00
parent d8e2569210
commit 806fb925f0
8 changed files with 44 additions and 49 deletions

View File

@@ -1,2 +1,14 @@
<h1>Welcome to SvelteKit</h1>
<p>Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation</p>
<script lang="ts">
import { enhance } from '$app/forms';
import type { PageServerData } from './$types';
let { data }: { data: PageServerData } = $props();
</script>
<h1>Welcome to Serengo</h1>
<p>Hi, {data.user.username}!</p>
<p>Your user ID is {data.user.id}.</p>
<form method="post" action="/logout" use:enhance>
<button>Sign out</button>
</form>