Files
chitai/frontend/src/routes/(root)/settings/account/+page.svelte
T
patrick d6207b5743 refactor: resolve() internal links instead of plain hrefs
Type-checks every link against the real route tree. Caught a dead one: the
book page linked tags to /tag/{id}, a route that has never existed.
2026-08-12 11:08:09 -04:00

25 lines
575 B
Svelte

<script lang="ts">
import { resolve } from '$app/paths';
import { goto } from '$app/navigation';
import { logout } from '$lib/api';
import { Button } from '$lib/components/ui/button/index.js';
import { LogOut } from '@lucide/svelte';
</script>
<h1 class="text-lg font-semibold">Account Settings</h1>
<p class="text-sm text-muted-foreground">Manage your account</p>
<div class="mt-4 flex flex-col gap-2">
<Button
onclick={async () => {
await logout();
goto(resolve('/login'));
}}
variant="outline"
class="w-32"
>
<LogOut />
Logout
</Button>
</div>