import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"; import { exposureStats } from "@/lib/holdings"; import type { Holding } from "@/types/finance"; function Bar({ label, value, pct }: { label: string; value: string; pct: number }) { return (
{label} {value}
); } /** * How concentrated the portfolio is, not a recommendation, a read: the * single biggest position, the top three combined, and whichever currency * dominates. Same underlying holdings the Allocation panel groups, a * different question about them. */ export function ExposurePanel({ holdings }: { holdings: Holding[] }) { const stats = exposureStats(holdings); return ( Exposure Concentration across the portfolio {stats.total === 0 ? (

No holdings yet.

) : ( <> {stats.topHolding && ( )} {stats.topCurrency && ( )} )}
); }