From 71f5d958e8e9426519b5e4ddbee7f371ddcde3cc Mon Sep 17 00:00:00 2001 From: Ken Jannette Date: Fri, 20 Apr 2018 16:58:26 -0400 Subject: [PATCH] Cleaned up code for mapping state to jsx in SearchPage --- src/SearchPage.js | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/SearchPage.js b/src/SearchPage.js index 1024bf8..fd742e5 100644 --- a/src/SearchPage.js +++ b/src/SearchPage.js @@ -37,30 +37,28 @@ class SearchPage extends Component {
    - - this.state.results.map((result) => ( - -
  1. -
    -
    -
    -
    - -
    -
    -
    {result.title}
    -
    {result.authors}
    -
    -
  2. - - ) - + { + this.state.results.map((result) => { + return
  3. +
    +
    +
    +
    + +
    +
    +
    {result.title}
    +
    {result.authors}
    +
    +
  4. + } + }