From 4819e5ca0c14dcc8a97ebd30492db2908125b411 Mon Sep 17 00:00:00 2001 From: Ken Jannette Date: Fri, 20 Apr 2018 12:48:40 -0400 Subject: [PATCH] Minor typo fix --- src/App.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 816dac7..9cd63e4 100755 --- a/src/App.js +++ b/src/App.js @@ -4,7 +4,7 @@ import { Link, Route } from 'react-router-dom' // import * as BooksAPI from './BooksAPI' import Bookshelf from './Bookshelf' import createHistory from 'history/createBrowserHistory' -import { getAll, search } from './BooksAPI' +import { getAll, search, update } from './BooksAPI' import SearchPage from './SearchPage' import './App.css' @@ -48,9 +48,11 @@ class BooksApp extends React.Component { const id = e.target.name const newShelf = e.target.value const books = this.state.books + books.forEach((book) => { if (book.id === id) { book.shelf = newShelf; + update(book, newShelf) } }); this.setState({ books });