import { sensitivityGuideSchema, type SensitivityGuide, } from "@/lib/schemas"; import { cn } from "@/lib/utils"; const severityColors = { mild: "border-emerald-400/20 bg-emerald-400/5", moderate: "border-amber-400/20 bg-amber-400/5", strong: "border-red-400/20 bg-red-400/5", }; export function SensitivityGuideView({ data }: { data: unknown }) { const result = sensitivityGuideSchema.safeParse(data); if (!result.success) { return (
Could not display this insight (data format issue). Try another card or refresh later.
); } const parsed = result.data as SensitivityGuide; return (

{parsed.summary}

{parsed.themes.map((theme, index) => (

{theme.theme}

{theme.severity} {theme.approximateTiming ? ( ~{theme.approximateTiming} ) : null}

{theme.description}

))}
); }