added filer/maping funciton to bookshelf to sort books by category (currently/want to/read)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user