"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; export default function Menu() { const pathname = usePathname(); const isActive = (path) => path === pathname; const isHomeLinkActive = () => { return homeLinks.some((link) => link.path === pathname) ? 1 : 0; }; const isAboutLinkActive = () => { return aboutLinks.some((link) => link.path === pathname) ? 1 : 0; }; const isServicesLinkActive = () => { return servicesLinks.some((link) => link.path === pathname) ? 1 : 0; }; const isPagesLinkActive = () => { return pagesLinks.some((link) => link.path === pathname) ? 1 : 0; }; const isBlogLinkActive = () => { return blogLinks.some((link) => link.path === pathname) ? 1 : 0; }; return ( <>