import { Link } from "@tanstack/react-router"; import { LucideIcon } from "../lib/iconData"; interface DashboardCardProps { to: string; search?: Record; title: string; icon: string; stats: Array<{ label: string; value: string }>; emptyText?: string; } export function DashboardCard({ to, search, title, icon, stats, emptyText, }: DashboardCardProps) { const allZero = stats.every( (s) => s.value === "0" || s.value === "$0.00" || s.value === "0g", ); return (

{title}

{stats.map((stat) => (
{stat.label} {stat.value}
))}
{allZero && emptyText && (

{emptyText}

)} ); }