'use client' import React from "react"; import { Navbar as MTNavbar, Collapse, Button, IconButton, Typography, } from "@material-tailwind/react"; import { RectangleStackIcon, UserCircleIcon, CommandLineIcon, Squares2X2Icon, XMarkIcon, Bars3Icon, } from "@heroicons/react/24/solid"; interface NavItemProps { children: React.ReactNode; href?: string; } function NavItem({ children, href }: NavItemProps) { return (
  • {children}
  • ); } const NAV_MENU = [ // { // name: "Page", // icon: RectangleStackIcon, // }, // { // name: "Account", // icon: UserCircleIcon, // }, { name: "Add New Paper", icon: RectangleStackIcon, href: "https://github.com/AMEERAZAM08/research-index/blob/main/README.md", }, ]; const Navbar =()=> { const [open, setOpen] = React.useState(false); const [isScrolling, setIsScrolling] = React.useState(false); const handleOpen = () => setOpen((cur:any) => !cur); React.useEffect(() => { window.addEventListener( "resize", () => window.innerWidth >= 960 && setOpen(false) ); }, []); React.useEffect(() => { function handleScroll() { if (window.scrollY > 0) { setIsScrolling(true); } else { setIsScrolling(false); } } window.addEventListener("scroll", handleScroll); return () => window.removeEventListener("scroll", handleScroll); }, []); return ( <>
    Research-Index {/*
    */} {open ? ( ) : ( )}
      {NAV_MENU.map(({ name, icon: Icon, href }) => ( {name} ))}
    ); } export default Navbar;