import Link from "next/link"; import router from "next/router"; // helpers import { cn } from "@/helpers/common.helper"; export const PreferencesMobileHeader = () => { const profilePreferenceLinks: Array<{ label: string; href: string; }> = [ { label: "Theme", href: `/profile/preferences/theme`, }, { label: "Email", href: `/profile/preferences/email`, }, ]; return (
{profilePreferenceLinks.map((link, index) => ( console.log(router.asPath)} className={cn( "flex justify-around py-2 w-full", router.asPath.includes(link.label.toLowerCase()) ? "border-b-2 border-custom-primary-100" : "" )} >
{link.label}
))}
); };