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.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<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';
|
||||
@@ -12,7 +13,7 @@
|
||||
<Button
|
||||
onclick={async () => {
|
||||
await logout();
|
||||
goto('/login');
|
||||
goto(resolve('/login'));
|
||||
}}
|
||||
variant="outline"
|
||||
class="w-32"
|
||||
|
||||
Reference in New Issue
Block a user