fix: Correct image URL in ReportDetailModal

- Fix photo URL construction to use correct backend URL (localhost:3005)
- Remove incorrect VITE_API_BASE_URL reference
- Images should now display properly in report details
This commit is contained in:
2025-11-18 00:59:29 +00:00
parent bb5f79ce64
commit 82521088c3

View File

@@ -128,7 +128,7 @@ export function ReportDetailModal({ report, isOpen, onClose, onVerify, onDispute
src={
report.photoUrls[currentPhotoIndex].startsWith('http')
? report.photoUrls[currentPhotoIndex]
: `${(import.meta.env.VITE_API_BASE_URL || 'http://localhost:3005/api').replace('/api', '')}${report.photoUrls[currentPhotoIndex]}`
: `http://localhost:3005${report.photoUrls[currentPhotoIndex]}`
}
alt={`Report photo ${currentPhotoIndex + 1}`}
className="w-full h-80 object-contain"