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 === "/over"

    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 ? "/" : "/over"}>
                        <h1>{isInfoPage ? "sluiten" : "meer"}</h1>
                    </Link>
                </div>
            </nav>
        </header>
    )
}

