diff --git a/apps/web/src/components/diagnose-result-view.tsx b/apps/web/src/components/diagnose-result-view.tsx index a120b5b..4691505 100644 --- a/apps/web/src/components/diagnose-result-view.tsx +++ b/apps/web/src/components/diagnose-result-view.tsx @@ -15,7 +15,7 @@ import { RiskBadge } from "@/components/risk-badge"; type Props = { imageUrl: string; - confidence: number; // contoh: 0.95 + confidence: number; diseaseName: string; scientificName: string; riskLevel: string; @@ -42,8 +42,8 @@ export function DiagnosisResultView({ const getRiskLevelKey = (level: string): "low" | "medium" | "high" => { const normalized = level.toLowerCase(); - if (normalized.includes("rendah")) return "low"; - if (normalized.includes("tinggi")) return "high"; + if (normalized.includes("rendah") || normalized === "low") return "low"; + if (normalized.includes("tinggi") || normalized === "high") return "high"; return "medium"; }; @@ -85,18 +85,35 @@ export function DiagnosisResultView({
-
+
+