From d2f6d9f85f17279e45078c3a3a4db0fe51d7f17c Mon Sep 17 00:00:00 2001 From: Ken Jannette Date: Wed, 18 Apr 2018 10:44:07 -0400 Subject: [PATCH] fixed image urls for books on each book shelf --- src/Bookshelf.js | 142 ++++++++++++++------------------------- src/oneBookListItem.html | 44 ------------ 2 files changed, 50 insertions(+), 136 deletions(-) delete mode 100644 src/oneBookListItem.html diff --git a/src/Bookshelf.js b/src/Bookshelf.js index 5e991fd..a929d87 100644 --- a/src/Bookshelf.js +++ b/src/Bookshelf.js @@ -4,11 +4,9 @@ class Bookshelf extends Component { render() { const books = this.props.books -/* - console.log(books.filter(function(book){ - return book.shelf === "currentlyReading" - })) -*/ + + console.log(books) + return (
@@ -29,7 +27,7 @@ class Bookshelf extends Component {
  • -
    +
    - - - - - - + + {books.filter(function(book){ + return book.shelf === "wantToRead" + }).map((book) => ( + +
  • +
    +
    +
    +
    + +
    +
    {book.title}
    +
    {book.authors}
    -
    1776
    -
    David McCullough
    -
  • - -
  • -
    -
    -
    -
    - -
    -
    -
    Harry Potter and the Sorcerers Stone
    -
    J.K. Rowling
    -
    -
  • + + ))} + @@ -96,60 +83,31 @@ class Bookshelf extends Component {

    Read

      -
    1. -
      -
      -
      -
      - + + {books.filter(function(book){ + return book.shelf === "read" + }).map((book) => ( + +
    2. +
      +
      +
      +
      + +
      +
      {book.title}
      +
      {book.authors}
      -
      The Hobbit
      -
      J.R.R. Tolkien
      -
    - -
  • -
    -
    -
    -
    - -
    -
    -
    Oh, the Places Youll Go!
    -
    Seuss
    -
    -
  • -
  • -
    -
    -
    -
    - -
    -
    -
    The Adventures of Tom Sawyer
    -
    Mark Twain
    -
    -
  • + + ))} + diff --git a/src/oneBookListItem.html b/src/oneBookListItem.html deleted file mode 100644 index 4e7a272..0000000 --- a/src/oneBookListItem.html +++ /dev/null @@ -1,44 +0,0 @@ -
  • -
    -
    -
    -
    - -
    -
    -
    To Kill a Mockingbird
    -
    Harper Lee
    -
    -
  • - -books.filter(function(book){ - return book.shelf === "currentlyReading" -}).map((book) => { - return - -
  • -
    -
    -
    -
    - -
    -
    -
    {book.title}
    -
    {book.authors}
    -
    -
  • - -})