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:
committed by
Vishnu Ks
parent
89cdab6ad2
commit
fb6e2e8b5d
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user