React error fixes (#180)

* fix className errors by replacing class= with className= in templates; remove unused imports

* fix component key warning by adding the node.id key to the component
This commit is contained in:
Josh RosenHanst
2019-10-17 02:21:25 -04:00
committed by Vishnu Ks
parent 89cdab6ad2
commit fb6e2e8b5d
4 changed files with 10 additions and 13 deletions

View File

@@ -1,8 +1,6 @@
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
import Image from "../components/image"
import SEO from "../components/seo"
import BookCard from "../components/bookcard"
@@ -10,10 +8,10 @@ export default ({data}) => {
return (
<Layout>
<SEO title="Home" />
<div class="flex flex-wrap">
<div className="flex flex-wrap">
{data.allBooksJson.edges.map(function(x) {
return (
<BookCard book={x.node} />
<BookCard book={x.node} key={x.node.id} />
)
})}
</div>