this is so cursed
All checks were successful
Code quality checks / build (23) (push) Successful in 33s
Push code / build (push) Successful in 52s

This commit is contained in:
Lara 2024-11-03 12:51:58 +02:00
parent b4392ea66a
commit 16651fce27
Signed by: laratheprotogen
GPG key ID: 5C0296EB3165F98B

View file

@ -1,10 +1,15 @@
<script lang="ts">
import logo from '$lib/img/logo.png';
import { page } from '$app/stores';
import { onMount } from 'svelte';
let { children } = $props();
let guildsAnchor: HTMLAnchorElement | undefined = $state();
let guildsAnchor: string = $state("/new/dashboard");
onMount(() => {
console.log($page.url.pathname);
})
async function logout() {
@ -24,7 +29,7 @@
<div class="flex-1 flex items-center flex-wrap">
<ul class="dashboard-nav list-none flex md:ml-8">
<a class="flex-auto mr-4" href="/new/dashboard" bind:this={guildsAnchor} class:underline={guildsAnchor.href === $page.url.pathname}>Guilds</a>
<a class="flex-auto mr-4" href={guildsAnchor} class:underline={guildsAnchor === $page.url.pathname}>Guilds</a>
<button class="navbar-item hover:text-red-400 mr-2" onclick={logout}>Log out</button>
</ul>