mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Fix key prop
This commit is contained in:
parent
2e93a72c56
commit
520f8d34b8
@ -36,7 +36,7 @@ export const FriendBarView: FC<FriendBarViewProps> = props =>
|
|||||||
</button>
|
</button>
|
||||||
{ Array.from(Array(maxDisplayCount), (e, i) =>
|
{ Array.from(Array(maxDisplayCount), (e, i) =>
|
||||||
{
|
{
|
||||||
return <FriendBarItemView friend={ (onlineFriends[ indexOffset + i ] || null) } />;
|
return <FriendBarItemView key={ i } friend={ (onlineFriends[ indexOffset + i ] || null) } />;
|
||||||
}) }
|
}) }
|
||||||
<button type="button" className="btn btn-sm btn-black align-self-center friend-bar-button" disabled={ !canIncreaseIndex } onClick={ event => setIndexOffset(indexOffset + 1) }>
|
<button type="button" className="btn btn-sm btn-black align-self-center friend-bar-button" disabled={ !canIncreaseIndex } onClick={ event => setIndexOffset(indexOffset + 1) }>
|
||||||
<i className="fas fa-chevron-right" />
|
<i className="fas fa-chevron-right" />
|
||||||
|
Loading…
Reference in New Issue
Block a user