0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-23 04:30:11 +09:00

Compare commits

..

No commits in common. "d1f0180c130acda2d769e22be313eedff4f4d26a" and "1131a1f9dc4453fb7a3d63eeaa06847da0f3e543" have entirely different histories.

2 changed files with 6 additions and 12 deletions

View File

@ -13,23 +13,17 @@ const Layout = (props) => {
const { locale, locales, defaultLocale, pathname } = router
const [isMounted, setIsMounted] = useState(false);
const { theme, setTheme, getTheme } = useTheme();
useEffect(() => {
const { theme, setTheme } = useTheme();
useEffect(() => {
setIsMounted(true);
}, []);
const switchTheme = () => {
const switchTheme = () => {
if (isMounted) {
setTheme(theme === "light" ? "dark" : "light");
}
};
return (
<button className="my-4 mx-3 text-2xl" onClick={switchTheme}>
{theme === 'light' ? (
<span>🌙</span>
) : (
<span>🌄</span>
)}
</button>
<button className="my-4 mx-3 text-2xl" onClick={switchTheme}>🌙</button>
)
}
export default Layout

View File

@ -40,7 +40,7 @@ export default function About(props) {
<div className="flex-1"><p className="font-bold">OS </p>Arch Linux</div>
<div className="flex-1"><p className="font-bold">{location} </p>{hiroshima}</div>
</div>
<iframe src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" className="w-2/3" frameBorder="0"></iframe>
<iframe src="https://mackerel.io/embed/public/embed/heHnGhDanoIDlf7jjxUe9yPVrsG3deeH5ptD8suErrq5w46crWEIYdLfzLoukzfF?period=24h" height="400" className="w-2/3" frameborder="0"></iframe>
{
// raspberry Datadog
@ -52,7 +52,7 @@ export default function About(props) {
<div className="flex-1"><p className="font-bold">OS </p>Raspbian GNU/Linux 10 (buster)</div>
<div className="flex-1"><p className="font-bold">{location} </p>{tottori}</div>
</div>
<iframe src="https://mackerel.io/embed/public/embed/5HVbQiwuxrMithyrGjmmQCCOVgJ6Ptf94SDA2qWSTsh2rtz7pjePihYzaW5QEml4?period=24h" height="400" className="w-2/3" frameBorder="0"></iframe>
<iframe src="https://mackerel.io/embed/public/embed/5HVbQiwuxrMithyrGjmmQCCOVgJ6Ptf94SDA2qWSTsh2rtz7pjePihYzaW5QEml4?period=24h" height="400" className="w-2/3" frameborder="0"></iframe>
</div>