Commit 48618881 authored by Seth A Johnson's avatar Seth A Johnson
Browse files

Remove the BookCover component, we're only showing 2 BookCards

on the front page.
parent 8f14cedc
import React from "react"
import Img from "gatsby-image"
const BookCover = ({book}) => {
return (
<div className="card mb-3 book-card">
<a href={book.readLink}>
<div className="row no-gutters">
<div className="col-md-12">
<Img fluid={book.cover.childImageSharp.fluid}
alt={`cover of ${book.title}`}
className="cover-only-img"
/>
</div>
</div>
</a>
</div>
)
}
export default BookCover
import React from "react"
import BookCard from "./bookCard"
import BookCover from "./bookCover"
const BookList = ({books}) => {
......@@ -20,19 +19,6 @@ const BookList = ({books}) => {
})
}
</div>
<div className="row book-card-covers-only-list">
{
books.map(({node}) => {
if (node.frontmatter.orderOnPage > 5) {
return (
<BookCover key={node.id} book={node.frontmatter} />
)
} else {
return null
}
})
}
</div>
</div>
)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment