Refactor button component and theme switcher

This commit is contained in:
2024-02-10 18:45:31 +01:00
parent 1a4ad1f97e
commit 66c6e0a439
2 changed files with 16 additions and 25 deletions
+1 -10
View File
@@ -6,16 +6,7 @@ export const ThemeSwitcher = () => {
const { theme, setTheme } = useTheme()
const toggle = () => {
switch (theme) {
case 'dark':
setTheme('light')
break
case 'light':
setTheme('dark')
break
default:
break
}
setTheme(theme === 'light' ? 'dark' : 'light')
}
return (