Skip to content

Commit 06fcfa5

Browse files
committed
Fixing a type error
1 parent aa21cff commit 06fcfa5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/Global/ThemeSwitch/component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ export default function ThemeSwitch() {
4747
checked={theme === 'dark'}
4848
onClick={
4949
(e) => {
50-
const selectedTheme = e.target.checked ? 'dark' : 'light';
50+
const input = e.target as HTMLInputElement;
51+
const selectedTheme = input.checked ? 'dark' : 'light';
5152
setTheme(selectedTheme);
5253
localStorage.setItem('theme', selectedTheme);
5354
applyTheme(selectedTheme);

0 commit comments

Comments
 (0)