Skip to content

Commit

Permalink
refactor(ui): ⚡ remove useless computed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
wrzrmzx committed Apr 7, 2024
1 parent be2129f commit c1ed033
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions composables/darkmode/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit c1ed033

Please sign in to comment.