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