"use client"; import Logo from "@/components/Logo"; import { headerLinks } from "@/constants"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Menu, Moon, Sun, X } from "lucide-react"; import { useTheme } from "next-themes"; import { useEffect, useState } from "react"; import PropTypes from "prop-types"; function Header({ docLinks }) { const pathname = usePathname(); const [menuShown, setMenuShown] = useState(false); const { resolvedTheme, setTheme } = useTheme(); useEffect(() => { if (menuShown) { document.documentElement.style.overflow = "hidden"; } else { document.documentElement.style.overflow = null; } }, [menuShown]); return (
MERNMail logo Git
); } Header.propTypes = { docLinks: PropTypes.arrayOf(PropTypes.object) }; export default Header;