added setting link to sidebar

pull/3/head
TZGyn 2 years ago
parent ce3677cf50
commit f2d5e40b8f
Signed by: TZGyn
GPG Key ID: 122EAF77AE81FD4A

@ -1,4 +1,5 @@
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores'
import UserIcon from './UserIcon.svelte' import UserIcon from './UserIcon.svelte'
import { Separator } from '$lib/components/ui/separator' import { Separator } from '$lib/components/ui/separator'
@ -14,6 +15,7 @@
{ href: '/', name: 'Home' }, { href: '/', name: 'Home' },
{ href: '/links', name: 'Links' }, { href: '/links', name: 'Links' },
{ href: '/projects', name: 'Projects' }, { href: '/projects', name: 'Projects' },
{ href: '/settings/account', name: 'Settings' },
] as const ] as const
</script> </script>
@ -35,7 +37,9 @@
<div class="flex flex-col gap-4 p-4"> <div class="flex flex-col gap-4 p-4">
{#each routes as route} {#each routes as route}
<Button <Button
variant="ghost" variant={$page.url.pathname == route.href
? 'secondary'
: 'ghost'}
href={route.href} href={route.href}
class="justify-start text-base">{route.name}</Button> class="justify-start text-base">{route.name}</Button>
{/each} {/each}

Loading…
Cancel
Save