From 0a75dad09ce2e16c53865b5916f7485b018b8d9c Mon Sep 17 00:00:00 2001 From: Daniel Lorigan Date: Mon, 2 Dec 2024 22:23:59 -0800 Subject: [PATCH] Initial bump auth service instance up to layout to share between components --- src/routes/(app)/+layout.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 9594d9e..0d61d77 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -23,6 +23,7 @@ import Auth from '$lib/components/app/Auth.svelte'; import LanguageMenu from '$lib/components/layout/LanguageMenu.svelte'; import Banner from '$lib/components/layout/Banner.svelte'; + import { AuthService } from '$lib/utils/AuthService'; const LOCAL_STORAGE_KEY = 'shlips_store_shls'; let shlStore = writable( @@ -41,6 +42,8 @@ let mode: Writable = getContext('mode'); + let authService = new AuthService(); + $: { if ($shlStore) window.localStorage[LOCAL_STORAGE_KEY] = JSON.stringify($shlStore); }