"use client"; import { useState, useEffect } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Button } from "../ui/Button"; import { motion, AnimatePresence } from "framer-motion"; import { FiMenu, FiX, FiGlobe } from "react-icons/fi"; import { useLanguage } from "@/context/LanguageContext"; export const Navbar = () => { const [isOpen, setIsOpen] = useState(false); const pathname = usePathname(); const { locale, setLocale, t } = useLanguage(); const isActive = (path: string) => pathname === path; useEffect(() => { setIsOpen(false); }, [pathname]); useEffect(() => { if (isOpen) { document.body.style.overflow = "hidden"; } else { document.body.style.overflow = "unset"; } }, [isOpen]); const navLinks = [ { name: t.navbar.consultora, href: "/nosotros" }, { name: t.navbar.servicios, href: "/servicios" }, { name: t.navbar.participa, href: "/participa" }, { name: t.navbar.insights, href: "/insights" }, ]; return ( ); };