import { classNames } from "@/utils/helpers"; import { Disclosure } from "@headlessui/react"; import dynamic from "next/dynamic"; import Link from "next/link"; import type { FunctionComponent, ReactNode } from "react"; import { HiBars3, HiXMark } from "react-icons/hi2"; const navigation: { id: string; name: string; href: string }[] = [ { id: "home", name: "Home", href: "/" }, { id: "projects", name: "Projects", href: "/projects" }, { id: "contact", name: "Contact", href: "/contact" }, ]; type WrapperProps = { className?: string; hideNavigation?: boolean; current?: string; children?: ReactNode | ReactNode[] | null; }; const DotsDynamic = dynamic( () => import('@/components/Dots'), { ssr: false } ) 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;