import { useState, useEffect } from "react"; import { ArrowUpRight } from "lucide-react"; import { cls } from "@/lib/utils"; import Button from "@/components/ui/Button"; interface NavbarFullscreenStaticProps { logo: string; navItems: { name: string; href: string }[]; ctaButton: { text: string; href: string }; } const handleNavClick = (e: React.MouseEvent, href: string, onClose: () => void) => { if (href.startsWith("#")) { e.preventDefault(); const element = document.getElementById(href.slice(1)); element?.scrollIntoView({ behavior: "smooth", block: "start" }); } onClose(); }; const NavbarFullscreenStatic = ({ logo, navItems, ctaButton }: NavbarFullscreenStaticProps) => { const [menuOpen, setMenuOpen] = useState(false); useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (e.key === "Escape" && menuOpen) setMenuOpen(false); }; document.addEventListener("keydown", handleKeyDown); return () => document.removeEventListener("keydown", handleKeyDown); }, [menuOpen]); useEffect(() => { if (menuOpen) { document.body.style.overflow = "hidden"; } else { document.body.style.overflow = ""; } return () => { document.body.style.overflow = ""; }; }, [menuOpen]); return ( ); }; export default NavbarFullscreenStatic;