added filer/maping funciton to bookshelf to sort books by category (currently/want to/read)

This commit is contained in:
Ken Jannette
2018-04-18 10:23:25 -04:00
parent 982c7529e1
commit f12e36f927

View File

@@ -24,12 +24,12 @@ class Bookshelf extends Component {
{books.filter(function(book){
return book.shelf === "currentlyReading"
}).map((book) => {
return
<li>
}).map((book) => (
<li key={book.id}>
<div className="book">
<div className="book-top">
<div className="book-cover" style={{ width: 128, height: 193, backgroundImage: 'url({book.imageLinks.thumbnail}")' }}></div>
<div className="book-cover" style={{ width: 128, height: 193, backgroundImage: 'url("{book.imageLinks.thumbnail}")' }}></div>
<div className="book-shelf-changer">
<select>
<option value="none" disabled>Move to...</option>
@@ -44,7 +44,7 @@ class Bookshelf extends Component {
<div className="book-authors">{book.authors}</div>
</div>
</li>
})}
))}
</ol>
</div>