mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-29 10:53:59 +01:00
fix: theme switcher
This commit is contained in:
parent
ae835c1791
commit
29f8fe75f3
|
@ -34,18 +34,18 @@ const ThemeSwitcher = () => {
|
||||||
}
|
}
|
||||||
}, [theme]);
|
}, [theme]);
|
||||||
|
|
||||||
return (
|
return theme ? (
|
||||||
theme && (
|
<a
|
||||||
<a
|
className='flex py-3 px-3 items-center gap-3 rounded-md hover:bg-gray-500/10 transition-colors duration-200 text-white cursor-pointer text-sm'
|
||||||
className='flex py-3 px-3 items-center gap-3 rounded-md hover:bg-gray-500/10 transition-colors duration-200 text-white cursor-pointer text-sm'
|
onClick={switchTheme}
|
||||||
onClick={switchTheme}
|
>
|
||||||
>
|
{theme === 'dark' ? <SunIcon /> : <MoonIcon />}
|
||||||
{theme === 'dark' ? <SunIcon /> : <MoonIcon />}
|
{getOppositeTheme(theme).charAt(0).toUpperCase() +
|
||||||
{getOppositeTheme(theme).charAt(0).toUpperCase() +
|
getOppositeTheme(theme).slice(1)}{' '}
|
||||||
getOppositeTheme(theme).slice(1)}{' '}
|
mode
|
||||||
mode
|
</a>
|
||||||
</a>
|
) : (
|
||||||
)
|
<></>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue