import Link from "next/link";
import { useRouter } from "next/router";
import { useState } from "react";
import classnames from "classnames";
import path from "path";
import { useLockBodyScroll } from "../lib/hooks";
function ActiveLink({ children, href, className }) {
const router = useRouter();
const firstCrumb = router.asPath.split("/")[1];
const activeClassName = classnames({
"text-black": "/" + firstCrumb === href,
"text-gray": "/" + firstCrumb !== href,
});
return (
{children}
);
}
function MenuTray(props) {
// Locks document scrolling when menu is open
if (typeof document !== "undefined") {
if (props.isOpen) {
document.body.style.overflow = "hidden";
} else {
document.body.style.overflow = "visible";
}
}
const activeClasses = classnames({
"tray-menu-open": props.isOpen,
"tray-menu-closed": !props.isOpen,
});
return (
);
}
// This is the header for the index page
export default function Header(props) {
const [isOpen, toggleTray] = useState(false);
return (
Urbit
{
// Large screen header
}
{
// Small screen header
}
Docs
Blog
Events
);
}