diff --git a/app/components/navbar.tsx b/app/components/navbar.tsx index b731d7e..19d830d 100644 --- a/app/components/navbar.tsx +++ b/app/components/navbar.tsx @@ -2,26 +2,49 @@ import React, { ReactNode } from 'react'; import Link from 'next/link'; +import { MdArrowDropDown, MdArrowDropUp, MdMenu, MdClose } from 'react-icons/md'; const NavbarItem = ({ href, label, children }: { href: string, label: string, children?: ReactNode }) => { - const [dropdownHidden, setDropdownHidden] = React.useState(true); - const [dropdownOnHover, setDropdownOnHover] = React.useState(false); + const isHovered = React.useRef(false); + const [dropdownHidden, setDropdownHidden] = React.useState(true); // state for desktop layout (using hover) + const [mobileDropdownHidden, setMobileDropdownHidden] = React.useState(true); // state for mobile layout (using click) return (