feat:move auth demo to main
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user