Fixed bug in onResultSelect in app.js so new books will persist after page refresh
This commit is contained in:
@@ -35,11 +35,11 @@ class BooksApp extends React.Component {
|
||||
this.setState({
|
||||
books: [...this.state.books, newBook]
|
||||
});
|
||||
const newBooks = this.state.books
|
||||
newBooks.forEach((book) => {
|
||||
update(book, book.shelf)
|
||||
})
|
||||
});
|
||||
const newBooks = this.state.books
|
||||
newBooks.forEach((book) => {
|
||||
update(book, book.shelf)
|
||||
})
|
||||
history.push('/');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user