From 524cdc199cc847a95b67f9ad205bc028b11a0fcc Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Fri, 24 May 2024 19:47:39 +0000 Subject: [PATCH] chore: Refactor Navbar and UserAvatar components --- src/lib/components/Navbar.svelte | 21 ++++++++++----------- src/lib/components/UserAvatar.svelte | 13 +------------ src/lib/config.ts | 2 +- 3 files changed, 12 insertions(+), 24 deletions(-) diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index dd419a1..c94a194 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -36,15 +36,7 @@ let count = 0; - let infoModalOpen = false; - - function showModal() { - infoModalOpen = true; - } - - function closeModal() { - infoModalOpen = false; - } + let isInfoModalOpen = false; // Set the visit count to the number of adventures stored in local storage const isBrowser = typeof window !== "undefined"; @@ -53,6 +45,10 @@ } +{#if isInfoModalOpen} + (isInfoModalOpen = false)} /> +{/if} +