|
|
|
@ -16,9 +16,17 @@ export default function ThemeToggle() {
|
|
|
|
|
window.localStorage.setItem("theme", activeTheme);
|
|
|
|
|
}, [activeTheme]);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<a onClick={() => setActiveTheme(inactiveTheme)} href="#">
|
|
|
|
|
<span>🌙</span>
|
|
|
|
|
</a>
|
|
|
|
|
)
|
|
|
|
|
if(activeTheme == 'light') {
|
|
|
|
|
return (
|
|
|
|
|
<a onClick={() => setActiveTheme(inactiveTheme)} href="#">
|
|
|
|
|
<span>🌙</span>
|
|
|
|
|
</a>
|
|
|
|
|
)
|
|
|
|
|
} else {
|
|
|
|
|
return (
|
|
|
|
|
<a onClick={() => setActiveTheme(inactiveTheme)} href="#">
|
|
|
|
|
<span>☀️</span>
|
|
|
|
|
</a>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|