From 8ff9a84af416f9b9e791b74567d91635be5b1e82 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sun, 12 Jun 2022 14:26:40 +0200 Subject: refactor: Use store for setting current locale instead of directly setting a cookie This was not doable before because locale.ts was inside of projects and not web-shared --- apps/projects/src/app/pages/_layout.svelte | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'apps/projects/src/app') diff --git a/apps/projects/src/app/pages/_layout.svelte b/apps/projects/src/app/pages/_layout.svelte index b75c062..f0f80a0 100644 --- a/apps/projects/src/app/pages/_layout.svelte +++ b/apps/projects/src/app/pages/_layout.svelte @@ -10,7 +10,6 @@ import { IconNames } from "$shared/lib/configuration"; import LL from "$app/lib/i18n/i18n-svelte"; import BlowoutToolbelt from "$shared/components/blowout-toolbelt.svelte"; - import { currentLocale } from "$shared/lib/locale"; let ProfileModalFunctions = {}; let showUserMenu = false; @@ -18,19 +17,13 @@ const userMenuId = "__menu_" + random_string(3); const username = get_session_data()?.profile.username; - function toolbelt_change(event) { - if (event.detail.name === "locale") { - currentLocale.set(event.detail.value); - } - } - onMount(() => { userMenuTriggerNode = document.getElementById("open-user-menu"); }); - +