"use client"; import { useRef, useState } from "react"; import { ProfilePicture } from "./images/ProfilePicture"; import { Hamburger } from "./nav/Hamburger"; import { Links } from "./nav/Links"; import { Close } from "./icons/Close"; import Link from "next/link"; import { Dialog } from "@headlessui/react"; import { usePathname } from "next/navigation"; export const NavBar = () => { const path = usePathname(); const focusedRef = useRef(null); const [isOpen, setIsOpen] = useState(false); const checkPath = (href: string) => { if (href === path) { setIsOpen(false); } }; return ( <> setIsOpen(false)} // initialFocus={focusedRef} >
); };