Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
Update ThemeToggle.js
Browse files Browse the repository at this point in the history
Signed-off-by: Doc Jaan Altosaar Li <[email protected]>
  • Loading branch information
Doc Jaan Altosaar Li authored Aug 25, 2023
1 parent b3b41a6 commit 7e36a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/Shell/ThemeToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function ThemeToggle() {
//
}

const darkQuery = window.matchMedia('(prefers-color-scheme: dark)');
const darkQuery = window.matchMedia('(prefers-color-scheme: light)');
darkQuery.addListener((e) => setTheme(e.matches ? 'dark' : 'light'));

setTheme(preferredTheme || (darkQuery.matches ? 'dark' : 'light'));
Expand Down

0 comments on commit 7e36a9d

Please sign in to comment.