Skip to content

Commit

Permalink
fix: darkmode toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
ssong committed Mar 16, 2024
1 parent aadd31d commit 62d1337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ProviderTheme.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const storedTheme = typeof localStorage !== 'undefined' && localStorage.getItem('theme')

return (
storedTheme || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'dark' : 'light')
storedTheme || (window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')
)
}

Expand Down

0 comments on commit 62d1337

Please sign in to comment.