mirror of
https://github.com/yude-jp/yude.jp
synced 2024-12-22 12:10:11 +09:00
Compare commits
6 Commits
1131a1f9dc
...
d1f0180c13
Author | SHA1 | Date | |
---|---|---|---|
d1f0180c13 | |||
3f205d95f5 | |||
5e068b05ca | |||
efaf3180f6 | |||
ca2886afd0 | |||
37e1a5fca7 |
@ -13,17 +13,23 @@ const Layout = (props) => {
|
||||
const { locale, locales, defaultLocale, pathname } = router
|
||||
|
||||
const [isMounted, setIsMounted] = useState(false);
|
||||
const { theme, setTheme } = useTheme();
|
||||
useEffect(() => {
|
||||
const { theme, setTheme, getTheme } = 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}>🌙</button>
|
||||
<button className="my-4 mx-3 text-2xl" onClick={switchTheme}>
|
||||
{theme === 'light' ? (
|
||||
<span>🌙</span>
|
||||
) : (
|
||||
<span>🌄</span>
|
||||
)}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
export default Layout
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user