diff --git a/apps/web/src/components/diagnose-result-view.tsx b/apps/web/src/components/diagnose-result-view.tsx index 4f6a6ba..cd1fbe3 100644 --- a/apps/web/src/components/diagnose-result-view.tsx +++ b/apps/web/src/components/diagnose-result-view.tsx @@ -7,7 +7,9 @@ import { ShieldCheck, Pill, RefreshCcw, + FlaskConical, } from "lucide-react"; +import { RiskBadge } from "./risk-badge"; type Props = { imageUrl: string; @@ -36,6 +38,13 @@ export function DiagnosisResultView({ }: Props) { const [openSection, setOpenSection] = useState("detail"); + const getRiskLevelKey = (level: string): "low" | "medium" | "high" => { + const normalized = level.toLowerCase(); + if (normalized.includes("rendah")) return "low"; + if (normalized.includes("tinggi")) return "high"; + return "medium"; + }; + const toggleSection = (section: string) => { setOpenSection(openSection === section ? "" : section); }; @@ -94,9 +103,7 @@ export function DiagnosisResultView({ Tingkat Keparahan: - - {riskLevel.toUpperCase()} - + @@ -201,7 +208,7 @@ export function DiagnosisResultView({