Updated to Next.js 13

This commit is contained in:
Antonello Zanini
2022-11-18 13:54:54 +01:00
commit 0eae94dbe6
40 changed files with 6381 additions and 0 deletions

26
components/Header.js Normal file
View File

@@ -0,0 +1,26 @@
import Link from "next/link";
import styles from '../styles/Header.module.css'
export default function Header(props) {
const isInfoPage = typeof window !== "undefined" && window.location.pathname === "/info"
return (
<header className={styles.header}>
<nav
className={styles.nav}
role="navigation"
aria-label="main navigation"
>
<Link href="/">
<h1>{props.siteTitle}</h1>
</Link>
<div>
<Link href={isInfoPage ? '/' : '/info'}>
<h1>{isInfoPage ? 'close' : 'info'}</h1>
</Link>
</div>
</nav>
</header>
);
}