Use unique keys for voice broadcast pips (#10457)

This commit is contained in:
Michael Weimann 2023-03-27 18:19:42 +02:00 committed by GitHub
parent d33e416fc7
commit b0de7b3bb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -262,7 +262,7 @@ class PipContainerInner extends React.Component<IProps, IState> {
); );
return ({ onStartMoving }) => ( return ({ onStartMoving }) => (
<div key={voiceBroadcastPlayback.infoEvent.getId()} onMouseDown={onStartMoving}> <div key={`vb-playback-${voiceBroadcastPlayback.infoEvent.getId()}`} onMouseDown={onStartMoving}>
{content} {content}
</div> </div>
); );
@ -272,7 +272,7 @@ class PipContainerInner extends React.Component<IProps, IState> {
voiceBroadcastPreRecording: VoiceBroadcastPreRecording, voiceBroadcastPreRecording: VoiceBroadcastPreRecording,
): CreatePipChildren { ): CreatePipChildren {
return ({ onStartMoving }) => ( return ({ onStartMoving }) => (
<div onMouseDown={onStartMoving}> <div key="vb-pre-recording" onMouseDown={onStartMoving}>
<VoiceBroadcastPreRecordingPip voiceBroadcastPreRecording={voiceBroadcastPreRecording} /> <VoiceBroadcastPreRecordingPip voiceBroadcastPreRecording={voiceBroadcastPreRecording} />
</div> </div>
); );
@ -282,7 +282,7 @@ class PipContainerInner extends React.Component<IProps, IState> {
voiceBroadcastRecording: VoiceBroadcastRecording, voiceBroadcastRecording: VoiceBroadcastRecording,
): CreatePipChildren { ): CreatePipChildren {
return ({ onStartMoving }) => ( return ({ onStartMoving }) => (
<div onMouseDown={onStartMoving}> <div key={`vb-recording-${voiceBroadcastRecording.infoEvent.getId()}`} onMouseDown={onStartMoving}>
<VoiceBroadcastRecordingPip recording={voiceBroadcastRecording} /> <VoiceBroadcastRecordingPip recording={voiceBroadcastRecording} />
</div> </div>
); );