🚨(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
|
<HStack
|
||||||
role="listitem"
|
role="listitem"
|
||||||
justify="space-between"
|
justify="space-between"
|
||||||
key={participant.identity}
|
|
||||||
id={participant.identity}
|
id={participant.identity}
|
||||||
className={css({
|
className={css({
|
||||||
padding: '0.25rem 0',
|
padding: '0.25rem 0',
|
||||||
|
|||||||
@@ -56,7 +56,10 @@ export const ParticipantsList = () => {
|
|||||||
heading={t('raisedHands')}
|
heading={t('raisedHands')}
|
||||||
participants={raisedHandParticipants}
|
participants={raisedHandParticipants}
|
||||||
renderParticipant={(participant) => (
|
renderParticipant={(participant) => (
|
||||||
<HandRaisedListItem participant={participant} />
|
<HandRaisedListItem
|
||||||
|
key={participant.identity}
|
||||||
|
participant={participant}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
action={() => (
|
action={() => (
|
||||||
<LowerAllHandsButton participants={raisedHandParticipants} />
|
<LowerAllHandsButton participants={raisedHandParticipants} />
|
||||||
@@ -68,7 +71,10 @@ export const ParticipantsList = () => {
|
|||||||
heading={t('contributors')}
|
heading={t('contributors')}
|
||||||
participants={sortedParticipants}
|
participants={sortedParticipants}
|
||||||
renderParticipant={(participant) => (
|
renderParticipant={(participant) => (
|
||||||
<ParticipantListItem participant={participant} />
|
<ParticipantListItem
|
||||||
|
key={participant.identity}
|
||||||
|
participant={participant}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Div>
|
</Div>
|
||||||
|
|||||||
Reference in New Issue
Block a user