/* eslint-disable @next/next/no-img-element */ import { CategoryIcon } from "@/components/Icons"; import { isGeneric, logoFor } from "@/lib/logos"; // Plaid's logo, else a local brand logo, else the category icon for money-moving rows, else the first letter. // icon: the row's category icon key. small: a 16px mark beside text (issuer names), not a row avatar. export function Merchant({ name, logo, color, icon, small }: { name: string; logo?: string | null; color?: string | null; icon?: string | null; small?: boolean }) { const src = logo || logoFor(name); const size = small ? "size-4" : "size-8"; if (src) return ; if (small) return null; if (isGeneric(name, icon)) return ; return ( {name.slice(0, 1).toUpperCase()} ); } export function CategoryPill({ label, color }: { label: string; color: string }) { return ( {label} ); }