From 945d6eaa0e7ee6ff44365289fdc01a04b9ef7a7f Mon Sep 17 00:00:00 2001 From: Nick Retel Date: Mon, 28 Apr 2025 14:37:21 +0200 Subject: [PATCH] Move appearance ref definition outside useAppearance() --- resources/js/composables/useAppearance.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/composables/useAppearance.ts b/resources/js/composables/useAppearance.ts index 8abf354c..19a56592 100644 --- a/resources/js/composables/useAppearance.ts +++ b/resources/js/composables/useAppearance.ts @@ -62,9 +62,9 @@ export function initializeTheme() { mediaQuery()?.addEventListener('change', handleSystemThemeChange); } -export function useAppearance() { - const appearance = ref('system'); +const appearance = ref('system'); +export function useAppearance() { onMounted(() => { const savedAppearance = localStorage.getItem('appearance') as Appearance | null;