Skip to content

Commit

Permalink
Merge pull request #7573 from kodadot/fix/theme/isDarkMode
Browse files Browse the repository at this point in the history
🔧 isDarkMode
  • Loading branch information
roiLeo authored Oct 10, 2023
2 parents 611203b + 68b91e9 commit ccfd8fe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions composables/useTheme.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
export default function () {
const colorMode = useColorMode()

const isDarkMode = computed<boolean>(
() =>
colorMode.preference === 'dark' ||
document.documentElement.className.includes('dark-mode'),
)
const isDarkMode = computed<boolean>(() => colorMode.preference === 'dark')

const toggleColorMode = (): void => {
if (colorMode.preference === 'dark') {
Expand Down

0 comments on commit ccfd8fe

Please sign in to comment.