From a912d0463b1e8517f055f596c2cb033b88db6b9b Mon Sep 17 00:00:00 2001 From: whoswhip Date: Tue, 6 Jan 2026 17:51:19 -0500 Subject: [PATCH] fix: update Navbar and layout server to improve structure and data handling --- SharpbinV3.Client/src/lib/components/Navbar.svelte | 2 +- SharpbinV3.Client/src/routes/+layout.server.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SharpbinV3.Client/src/lib/components/Navbar.svelte b/SharpbinV3.Client/src/lib/components/Navbar.svelte index 0cae604..4769a80 100644 --- a/SharpbinV3.Client/src/lib/components/Navbar.svelte +++ b/SharpbinV3.Client/src/lib/components/Navbar.svelte @@ -20,7 +20,7 @@ : ''; -
+
Sharpbin {#if $user} diff --git a/SharpbinV3.Client/src/routes/+layout.server.ts b/SharpbinV3.Client/src/routes/+layout.server.ts index 8286c63..c171438 100644 --- a/SharpbinV3.Client/src/routes/+layout.server.ts +++ b/SharpbinV3.Client/src/routes/+layout.server.ts @@ -1,11 +1,11 @@ import type { LayoutServerLoad } from './$types'; -export const load: LayoutServerLoad = async ({ fetch }) => { +export const load: LayoutServerLoad = async ({ fetch, url }) => { try { const res = await fetch('/api/auth/info'); const options = await res.json(); - return { options }; + return { options , url: url.href }; } catch { - return { options: null }; + return { options: null, url: url.href }; } };