import type {FunctionComponent, ReactNode} from "react"; import {Disclosure} from '@headlessui/react' import {HiBars3, HiXMark} from "react-icons/hi2"; import {classNames} from "../utils/helpers"; import Link from "next/link"; const navigation: { id: string, name: string, href: string }[] = [ {id: 'home', name: 'Home', href: '/',}, {id: 'projects', name: 'Projects', href: '/#projects'}, // TODO: Switch this back to /projects once proper page is made {id: 'contact', name: 'Contact', href: '/contact'}, ] type WrapperProps = { className?: string; hideNavigation?: boolean; current?: string; children?: ReactNode | ReactNode[] | null; }; const AppWrapper: FunctionComponent = ({current, children, hideNavigation, className}: WrapperProps) => { return
{!hideNavigation ? {({open}) => ( <>
{/* Mobile menu button*/} Open main menu {open ? (
{navigation.map((item) => ( {item.name} ))}
{navigation.map((item) => ( {item.name} ))}
)}
: null} {children}
} export default AppWrapper;