diff --git a/front/src/App.svelte b/front/src/App.svelte index 63e85df..28090dc 100644 --- a/front/src/App.svelte +++ b/front/src/App.svelte @@ -14,20 +14,19 @@ cart: {path: '/cart', className: 'active'}, } - let windowScrollY = 0; - let windowWidth = 0; + let scrollY = 0; + let width = 0; let oldLocation = undefined; let fullWidth = false; let showNavBar = false; - $: scrolled = windowScrollY > 0 - $: mobile = windowWidth < 700 - function routeLoading(event) { if (event.detail.location === oldLocation) { + console.log("Fake!"); return; // not an actual change } + showNavBar = event.detail.userData.showNavBar; fullWidth = event.detail.userData.fullWidth; oldLocation = event.detail.location; @@ -38,15 +37,18 @@ } - + {#if showNavBar } -