No msg
This commit is contained in:
@@ -15,14 +15,18 @@ class SearchPage extends Component {
|
|||||||
const books = this.props.books
|
const books = this.props.books
|
||||||
if (query.length > 3) {
|
if (query.length > 3) {
|
||||||
search(query).then((results) => {
|
search(query).then((results) => {
|
||||||
for (var result of results) {
|
if (results.error === undefined) {
|
||||||
for (var book of books) {
|
for (var result of results) {
|
||||||
if (result.title === book.title) {
|
for (var book of books) {
|
||||||
result.shelf = book.shelf
|
if (result.title === book.title) {
|
||||||
|
result.shelf = book.shelf
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.setState({ results });
|
||||||
|
} else {
|
||||||
|
this.setState({results: []})
|
||||||
}
|
}
|
||||||
this.setState({ results });
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user