/** * WorthDoing.ai * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: src/components/wd/OpportunityCard.tsx * Description: Opportunity card — Worth Score and evidence confidence shown as distinct figures, never blended. */ import Link from "next/link"; import { cn } from "@/lib/utils"; export function WorthScore({ score, confidence, size = "md", }: { score: number | null; confidence: number | null; size?: "md" | "lg"; }) { const conf = confidence ?? 0; const confTone = conf >= 0.7 ? "text-verdict" : conf >= 0.45 ? "text-signal" : "text-rust"; return (
{score != null ? Math.round(score) : "—"} {confidence != null ? `${Math.round(conf * 100)}% evidence` : "unscored"}
); } export function OpportunityCard({ id, title, summary, worthScore, evidenceConfidence, objective, hasReport = true, }: { id: string; title: string; summary: string; worthScore: number | null; evidenceConfidence: number | null; objective?: string; hasReport?: boolean; }) { return (
{objective && (

{objective}

)}

{title}

{summary}

{hasReport ? "read the full report →" : "report pending…"}

); }