Skip to content

Commit

Permalink
fix switch problem in mobile and installation step (#1262)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashkanakiya committed Aug 24, 2023
1 parent d1ab4a8 commit 7b9c7c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/scripts/components/LightDarkSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ defineProps({
const globalStore = useGlobalStore()
const isDark = ref(
localStorage.getItem('theme') === 'dark'
|| document.documentElement.classList.contains('dark'),
)
globalStore.isDarkModeOn = isDark
const enabled = computed({
get: () => globalStore.isDarkModeOn,
set: (value) => {
Expand Down

0 comments on commit 7b9c7c3

Please sign in to comment.