Skip to content

Commit

Permalink
fix(themes): augment timeout to themeSig assignment to localstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
maiieul committed Aug 18, 2024
1 parent 56e4ac2 commit 2b38edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/themes/src/lib/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const ThemeProvider = component$<ThemeProviderProps>(
({ cleanup }) => {
setTimeout(() => {
themeSig.value = localStorage.getItem(storageKey) || defaultTheme;
}, 1000);
}, 2000);
const media = window.matchMedia('(prefers-color-scheme: dark)');

const handleMediaQuery = $(async (e: MediaQueryListEvent | MediaQueryList) => {
Expand Down

0 comments on commit 2b38edf

Please sign in to comment.