fix: add key to mapped items (#57)

fix: add key to mapped items
This commit is contained in:
Jean-Philippe Sirois
2019-08-12 15:34:00 -04:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -74,7 +74,7 @@ export function ResourceHeader({
<SC.RecommendedReading> <SC.RecommendedReading>
Recommended reading Recommended reading
{recommendedReading.map(item => { {recommendedReading.map(item => {
return <ExtraLink item={item} /> return <ExtraLink key={item} item={item} />
})} })}
</SC.RecommendedReading> </SC.RecommendedReading>
)} )}
@@ -83,7 +83,7 @@ export function ResourceHeader({
<SC.ExternalResources> <SC.ExternalResources>
External Resources External Resources
{externalResources.map(item => { {externalResources.map(item => {
return <ExtraLink item={item} external /> return <ExtraLink key={item} item={item} external />
})} })}
</SC.ExternalResources> </SC.ExternalResources>
)} )}
+1 -1
View File
@@ -10,7 +10,7 @@ export function StackedAvatars({ authors }: StackedAvatarsProps) {
return ( return (
<SC.StackedAvatarsWrapper count={authors.length}> <SC.StackedAvatarsWrapper count={authors.length}>
{authors.map((author, index) => ( {authors.map((author, index) => (
<SC.AuthorAvatar src={author.avatar} index={index} /> <SC.AuthorAvatar key={index} src={author.avatar} index={index} />
))} ))}
</SC.StackedAvatarsWrapper> </SC.StackedAvatarsWrapper>
) )