chore: use path as key in div (#35317)

This commit is contained in:
Simon Knott 2025-03-24 08:59:51 +01:00 committed by GitHub
parent b3d19e2f80
commit 62821516bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,8 +126,8 @@ export const TestResultView: React.FC<{
</AutoChip></Anchor>}
{!!videos.length && <Anchor id='attachment-video'><AutoChip header='Videos' revealOnAnchorId='attachment-video'>
{videos.map((a, i) => <div key={`video-${i}`}>
<video key={a.path} controls> {/* key is required to ensure video is updated when the path changes */}
{videos.map(a => <div key={a.path}>
<video controls>
<source src={a.path} type={a.contentType}/>
</video>
<AttachmentLink attachment={a} result={result}></AttachmentLink>