Fix key prop

This commit is contained in:
Bill 2021-07-03 23:32:41 -04:00
parent 2e93a72c56
commit 520f8d34b8

View File

@ -36,7 +36,7 @@ export const FriendBarView: FC<FriendBarViewProps> = props =>
</button>
{ 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) }>
<i className="fas fa-chevron-right" />