import Link from "next/link"; import { Building2Icon, UsersIcon } from "lucide-react"; import { cn } from "@/lib/utils"; /** * The CRM's two halves. Horizontal because that is where a switch between * peers belongs — down the side is for navigating into something, across the * top is for choosing which of two equivalent things you are looking at. */ const TABS = [ { href: "/crm/companies", label: "Companies", icon: Building2Icon }, { href: "/crm/contacts", label: "Contacts", icon: UsersIcon }, ]; export function CrmTabs({ current }: { current: "companies" | "contacts" }) { return (
{TABS.map(({ href, label, icon: Icon }) => { const active = href.endsWith(current); return ( {label} ); })}
); }