import {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 = [ {name: 'Home', href: '/', current: true}, {name: 'Projects', href: '/projects', current: false}, {name: 'Contact', href: '/contact', current: false}, ] type WrapperProps = { children?: ReactNode | ReactNode[] | null; }; const AppWrapper: FunctionComponent = ({children}: WrapperProps) => { return
{({open}) => ( <>
{/* Mobile menu button*/} Open main menu {open ? (
{navigation.map((item) => ( {item.name} ))}
{navigation.map((item) => ( {item.name} ))}
)}
{children}
} export default AppWrapper;