When I try to iterate through my variable badges
and display each badge, I get this error :
Each child in an array or iterator should have a unique "key" prop.
var badges = author.badges.map((badge, index) => <span className="author__badge">
<Icon key={"icon" + index} name={`icon-${badge}`} />
</span>;
);
return (
<span className="author__name">{author.name}</span>
{ author.badge === "" ||
badges
}
<span className="author__nickname">{author.nickname}</span>
</div>
);