diff --git a/src/components/report/ReportDetailModal.tsx b/src/components/report/ReportDetailModal.tsx index 541dbf8..d68cf0f 100644 --- a/src/components/report/ReportDetailModal.tsx +++ b/src/components/report/ReportDetailModal.tsx @@ -18,7 +18,7 @@ export function ReportDetailModal({ report, isOpen, onClose, onVerify, onDispute const [showAuditLog, setShowAuditLog] = useState(false); const [comment, setComment] = useState(''); - if (!isOpen) return null; + if (!isOpen || !report) return null; const handleVerify = () => { if (onVerify) { @@ -292,7 +292,7 @@ export function ReportDetailModal({ report, isOpen, onClose, onVerify, onDispute - {report.verificationCount} verifications + {report.verificationCount || 0} verifications
@@ -300,13 +300,13 @@ export function ReportDetailModal({ report, isOpen, onClose, onVerify, onDispute - {report.disputeCount} disputes + {report.disputeCount || 0} disputes
{/* Auto-hide warning for disputed reports */} - {report.disputeCount >= 3 && ( + {(report.disputeCount || 0) >= 3 && (