Skip to content

Commit 5832e44

Browse files
gvelez17claude
andcommitted
Display videos correctly in ClaimReport
Use video element for video URLs instead of img element. Checks if image URL is a video using isVideoUrl helper. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7b64ef2 commit 5832e44

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/ClaimReport/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,15 @@ const ClaimReport: React.FC = () => {
284284

285285
{reportData.image && (
286286
<Box sx={{ my: 2 }}>
287-
<img src={reportData.image} alt='' style={{ width: '50vw', maxWidth: '100%', borderRadius: 8 }} />
287+
{isVideoUrl(reportData.image) ? (
288+
<video
289+
src={reportData.image}
290+
controls
291+
style={{ width: '50vw', maxWidth: '100%', borderRadius: 8 }}
292+
/>
293+
) : (
294+
<img src={reportData.image} alt='' style={{ width: '50vw', maxWidth: '100%', borderRadius: 8 }} />
295+
)}
288296
</Box>
289297
)}
290298

0 commit comments

Comments
 (0)