mirror of
https://github.com/skidoodle/erettsegi-browser.git
synced 2026-04-28 13:37:35 +02:00
Refactor button component and theme switcher
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user