fix(rn,humbnail) add key prop to array items

Fixes a React warning
This commit is contained in:
Saúl Ibarra Corretgé 2021-09-01 13:04:51 +02:00 committed by Saúl Ibarra Corretgé
parent 18e2232e9e
commit 5249998ec5
1 changed files with 5 additions and 1 deletions

View File

@ -224,6 +224,7 @@ class Thumbnail extends PureComponent<Props> {
if (!_isFakeParticipant) { if (!_isFakeParticipant) {
indicators.push(<View indicators.push(<View
key = 'top-left-indicators'
style = { [ style = { [
styles.thumbnailTopIndicatorContainer, styles.thumbnailTopIndicatorContainer,
styles.thumbnailTopLeftIndicatorContainer styles.thumbnailTopLeftIndicatorContainer
@ -232,13 +233,16 @@ class Thumbnail extends PureComponent<Props> {
{ renderDominantSpeakerIndicator && <DominantSpeakerIndicator /> } { renderDominantSpeakerIndicator && <DominantSpeakerIndicator /> }
</View>); </View>);
indicators.push(<View indicators.push(<View
key = 'top-right-indicators'
style = { [ style = { [
styles.thumbnailTopIndicatorContainer, styles.thumbnailTopIndicatorContainer,
styles.thumbnailTopRightIndicatorContainer styles.thumbnailTopRightIndicatorContainer
] }> ] }>
<ConnectionIndicator participantId = { participantId } /> <ConnectionIndicator participantId = { participantId } />
</View>); </View>);
indicators.push(<Container style = { styles.thumbnailIndicatorContainer }> indicators.push(<Container
key = 'bottom-indicators'
style = { styles.thumbnailIndicatorContainer }>
{ audioMuted && <AudioMutedIndicator /> } { audioMuted && <AudioMutedIndicator /> }
{ videoMuted && <VideoMutedIndicator /> } { videoMuted && <VideoMutedIndicator /> }
{ isScreenShare && <ScreenShareIndicator /> } { isScreenShare && <ScreenShareIndicator /> }