"use client"; import Link from "next/link"; type Props = { active: "stops" | "locations"; stopCount: number; locationCount: number; stopsSublabel?: string; // e.g. "269 · 7 cities" locationsSublabel?: string; // e.g. "41 · 8 cities" }; const StopIcon = () => ( ); const PinIcon = () => ( ); export default function StopsLocationsTabs({ active, stopCount, locationCount, stopsSublabel, locationsSublabel, }: Props) { const tabs = [ { value: "stops" as const, label: "Stops", count: stopCount, sublabel: stopsSublabel, icon: , href: "/admin/stops", }, { value: "locations" as const, label: "Locations", count: locationCount, sublabel: locationsSublabel, icon: , href: "/admin/stops?tab=locations", }, ]; return (
{tabs.map((t) => { const isActive = t.value === active; return ( {t.icon} {t.label} {t.count} {t.sublabel && ( · {t.sublabel} )} ); })}
); }