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:
@@ -128,7 +128,7 @@ export function ReportDetailModal({ report, isOpen, onClose, onVerify, onDispute
|
|||||||
src={
|
src={
|
||||||
report.photoUrls[currentPhotoIndex].startsWith('http')
|
report.photoUrls[currentPhotoIndex].startsWith('http')
|
||||||
? report.photoUrls[currentPhotoIndex]
|
? 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}`}
|
alt={`Report photo ${currentPhotoIndex + 1}`}
|
||||||
className="w-full h-80 object-contain"
|
className="w-full h-80 object-contain"
|
||||||
|
|||||||
Reference in New Issue
Block a user