🚨(frontend) resolve key prop warning in ParticipantListItem
Key prop was incorrectly passed down as a regular prop to ParticipantListItem instead of being used at the array mapping level. Key is a special React prop for list rendering and cannot be accessed as a component prop.
This commit is contained in:
committed by
aleb_the_flash
parent
36ea44befc
commit
f17471dae5
@@ -118,7 +118,6 @@ export const ParticipantListItem = ({
|
||||
<HStack
|
||||
role="listitem"
|
||||
justify="space-between"
|
||||
key={participant.identity}
|
||||
id={participant.identity}
|
||||
className={css({
|
||||
padding: '0.25rem 0',
|
||||
|
||||
@@ -56,7 +56,10 @@ export const ParticipantsList = () => {
|
||||
heading={t('raisedHands')}
|
||||
participants={raisedHandParticipants}
|
||||
renderParticipant={(participant) => (
|
||||
<HandRaisedListItem participant={participant} />
|
||||
<HandRaisedListItem
|
||||
key={participant.identity}
|
||||
participant={participant}
|
||||
/>
|
||||
)}
|
||||
action={() => (
|
||||
<LowerAllHandsButton participants={raisedHandParticipants} />
|
||||
@@ -68,7 +71,10 @@ export const ParticipantsList = () => {
|
||||
heading={t('contributors')}
|
||||
participants={sortedParticipants}
|
||||
renderParticipant={(participant) => (
|
||||
<ParticipantListItem participant={participant} />
|
||||
<ParticipantListItem
|
||||
key={participant.identity}
|
||||
participant={participant}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Div>
|
||||
|
||||
Reference in New Issue
Block a user