import { SecondaryNav } from "@/components/dashboard/secondary-nav";
import { biolinkCustomizationLinks } from "@/constants/nav-links";
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<div>
<SecondaryNav items={biolinkCustomizationLinks} />
{children}
</div>
);
}
"use client";
import { cn } from "@/lib/utils";
import Link from "next/link";
import { usePathname } from "next/navigation";
export function SecondaryNav({
items,
}: {
items: { name: string; href: string }[];
}) {
const pathname = usePathname();
return (
<nav className="w-full">
<ul className="flex w-full border-b">
{items.map((item, index) => (
<li key={index}>
<Link
href={item.href}
className={cn(
"flex items-center gap-2 border-2 border-transparent px-3 py-2 text-sm",
pathname === item.href && "border-b-foreground",
)}
>
{item.name}
</Link>
</li>
))}
</ul>
</nav>
);
}
whats wrong with this