Skip to content

Commit

Permalink
fix some react warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adamschwartz committed Dec 9, 2019
1 parent db86203 commit 6a937f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pages/built-with.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const IndexPage = ({

<div className="Collections">
{collections.map((collection, i) => (
<div className="Collections--collection">
<div className="Collections--collection" key={collection.id}>
<div className="Collection">
<div className="Collection--header">
<h2 className="Collection--title">{collection.name}</h2>
Expand All @@ -57,7 +57,7 @@ const IndexPage = ({

<div className="Collection--projects">
{collection.projects.map(project => (
<div className="Collection--project">
<div className="Collection--project" key={project.id}>
<Project project={project} />
</div>
))}
Expand Down
5 changes: 2 additions & 3 deletions src/templates/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react"
import { graphql, Link } from "gatsby"
import Img from "gatsby-image"

import Clap from "../components/clap"
import Layout from "../components/layout"
import Markdown from "../components/markdown"
import RelatedProject from "../components/project"
Expand Down Expand Up @@ -72,7 +71,7 @@ const Project = ({
{project.links.length > 0 && (
<div className="ProjectPage--header-action">
{[project.links[0]].map(({ linkType, url }) => (
<a className="ProjectPage--header-action-button Button Button-is-primary" href={url}>
<a className="ProjectPage--header-action-button Button Button-is-primary" href={url} key={url}>
{getPrimaryLinkText(linkType)}
</a>
))}
Expand Down Expand Up @@ -104,7 +103,7 @@ const Project = ({
<dt className="DefinitionList--term">Links</dt>
<dd className="DefinitionList--definition">
{project.links.map(({ linkType, url }) => (
<span className="ProjectPage--metadata-link">
<span className="ProjectPage--metadata-link" key={url}>
<a className="Link Link-with-right-arrow" href={url}>
{getLinkText(linkType)}
</a>
Expand Down

0 comments on commit 6a937f7

Please sign in to comment.