From c1ed03322869c84305ee6917d02c5c097c039caf Mon Sep 17 00:00:00 2001 From: Lurantis <1510033076@qq.com> Date: Sun, 7 Apr 2024 19:20:48 +0800 Subject: [PATCH] refactor(ui): :zap: remove useless computed variables --- composables/darkmode/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/composables/darkmode/index.ts b/composables/darkmode/index.ts index 2b6495b..234e026 100644 --- a/composables/darkmode/index.ts +++ b/composables/darkmode/index.ts @@ -21,11 +21,8 @@ export function applyTheme() { themePreference.value = storedPreference.value watchEffect(() => { - isDark.value = computed(() => - themePreference.value === 'system' ? usePreferredDark().value : themePreference.value === 'dark', - ).value + isDark.value = themePreference.value === 'system' ? usePreferredDark().value : themePreference.value === 'dark' }) - const html = document.documentElement const metaTag = document.querySelector('meta[name="theme-color"]') watchEffect(() => {