Files
Job-Info/ModeTemplate/frontend/src/routes/+page.svelte
T
aewing 05f8e2e3b6 Add ModeTemplate with Svelte 5 frontend and components
- Create reusable components: auth, api-client, shared-types
- ModeTemplate with Hono backend and SvelteKit frontend
- Auth store refactored to class-based Svelte 5 pattern
- SSR-safe hydrate() pattern for localStorage access
- Frontend builds successfully with Svelte 5 runes
2026-01-21 05:12:25 +00:00

18 lines
393 B
Svelte

<script lang="ts">
import { auth } from '$lib/stores/auth.svelte';
</script>
<h1>Mode Template</h1>
{#if auth.loading}
<p>Loading...</p>
{:else if auth.isAuthenticated}
<p>Welcome, {auth.user?.displayName}!</p>
<p>Email: {auth.user?.email}</p>
{:else}
<p>Please log in to continue.</p>
<button onclick={() => auth.redirectToLogin()}>
Sign in with Microsoft
</button>
{/if}