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>
Recommended reading
{recommendedReading.map(item => {
return <ExtraLink item={item} />
return <ExtraLink key={item} item={item} />
})}
</SC.RecommendedReading>
)}
@@ -83,7 +83,7 @@ export function ResourceHeader({
<SC.ExternalResources>
External Resources
{externalResources.map(item => {
return <ExtraLink item={item} external />
return <ExtraLink key={item} item={item} external />
})}
</SC.ExternalResources>
)}
+1 -1
View File
@@ -10,7 +10,7 @@ export function StackedAvatars({ authors }: StackedAvatarsProps) {
return (
<SC.StackedAvatarsWrapper count={authors.length}>
{authors.map((author, index) => (
<SC.AuthorAvatar src={author.avatar} index={index} />
<SC.AuthorAvatar key={index} src={author.avatar} index={index} />
))}
</SC.StackedAvatarsWrapper>
)