Skip to content

Commit

Permalink
fix navbar not updating properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ceitine committed Oct 27, 2024
1 parent cdd3985 commit 2125bf5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,18 @@
<p>small fish</p>
</a>
<div class="hidden h-full flex-row items-center gap-2 md:flex">
{#each routes as route}
<div class="h-full">
<NavButton
href={route.href}
icon={route.icon}
label={route.label}
disabled={$page.url.pathname == route.href}
/>
</div>
{/each}
{#key $page.url.pathname}
{#each routes as route}
<div class="h-full">
<NavButton
href={route.href}
icon={route.icon}
label={route.label}
disabled={$page.url.pathname == route.href}
/>
</div>
{/each}
{/key}
</div>
<button
class="pointer-events-auto scale-100 text-white transition-all md:hidden"
Expand Down

0 comments on commit 2125bf5

Please sign in to comment.