Skip to content

Commit 6e145d9

Browse files
fix: type assertion in useAppearance hook (#28)
1 parent a548ffb commit 6e145d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/js/hooks/use-appearance.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function useAppearance() {
3636
};
3737

3838
useEffect(() => {
39-
const savedAppearance = localStorage.getItem('appearance') as Appearance;
39+
const savedAppearance = localStorage.getItem('appearance') as Appearance | null;
4040
updateAppearance(savedAppearance || 'system');
4141

4242
return () => mediaQuery.removeEventListener('change', handleSystemThemeChange);

0 commit comments

Comments
 (0)