mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-23 04:30:11 +09:00
Cleanup old code
This commit is contained in:
parent
5e068b05ca
commit
3f205d95f5
@ -14,7 +14,6 @@ const Layout = (props) => {
|
|||||||
|
|
||||||
const [isMounted, setIsMounted] = useState(false);
|
const [isMounted, setIsMounted] = useState(false);
|
||||||
const { theme, setTheme, getTheme } = useTheme();
|
const { theme, setTheme, getTheme } = useTheme();
|
||||||
let moon = "🌙";
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setIsMounted(true);
|
setIsMounted(true);
|
||||||
}, []);
|
}, []);
|
||||||
@ -22,8 +21,6 @@ const Layout = (props) => {
|
|||||||
if (isMounted) {
|
if (isMounted) {
|
||||||
setTheme(theme === "light" ? "dark" : "light");
|
setTheme(theme === "light" ? "dark" : "light");
|
||||||
}
|
}
|
||||||
if (theme == "light") moon = "🌙";
|
|
||||||
if (theme == "dark") moon = "🌅";
|
|
||||||
};
|
};
|
||||||
console.log(theme);
|
console.log(theme);
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user