From eeae30ac0919900c2104fe8062f117c3e0009218 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sat, 30 Dec 2023 18:16:01 +0530 Subject: [PATCH] simplify --- .../theme-default/components/VPSwitchAppearance.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/theme-default/components/VPSwitchAppearance.vue b/src/client/theme-default/components/VPSwitchAppearance.vue index d7a70ddb..f63d1ce4 100644 --- a/src/client/theme-default/components/VPSwitchAppearance.vue +++ b/src/client/theme-default/components/VPSwitchAppearance.vue @@ -11,12 +11,10 @@ const toggleAppearance = inject('toggle-appearance', () => { isDark.value = !isDark.value }) -const lightModeSwitchTitle = computed(() => theme.value.lightModeSwitchTitle || 'Switch to light theme') - -const darkModeSwitchLabel = computed(() => theme.value.darkModeSwitchTitle || 'Switch to dark theme') - const switchTitle = computed(() => { - return isDark.value ? lightModeSwitchTitle.value : darkModeSwitchLabel.value + return isDark.value + ? theme.value.lightModeSwitchTitle || 'Switch to light theme' + : theme.value.darkModeSwitchTitle || 'Switch to dark theme' })