diff --git a/.env b/.env
new file mode 100644
index 0000000..3da9eb9
--- /dev/null
+++ b/.env
@@ -0,0 +1 @@
+PUBLIC_URL=http://www.findandexec.com/bb
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index ee92182..a5d2111 100755
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ node_modules
yarn.lock
.DS_Store
secrets.js
-build/
\ No newline at end of file
+build/
+.gitignore
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100755
index 1edac1e..0000000
--- a/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# MyReads Project
-
-This app allows the user to categorize books according to status: "Currently Reading," "Want to Read" and "Read" - kind of like a personal "playlist" for books!
-
-The main page displays the user's books by category. The main page also has a link to the search page, where the user can search the database for more books to add to the main page, and categorize them appropriately.
-
-To use the app:
-
-1. Download or clone this project from [git].
-
-2. To install app: from the command line, type: npm install.
-
-3. When complete, to run app, type: npm start and view the app in your favorite browser.
diff --git a/package.json b/package.json
index 921a010..7cd8497 100755
--- a/package.json
+++ b/package.json
@@ -1,4 +1,7 @@
{
+ "name": "bb",
+ "homepage": "http://www.execfunc.com/bb",
+ "version": "1.0",
"dependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.1",
diff --git a/public/favicon.ico b/public/favicon.ico
deleted file mode 100755
index 5c125de..0000000
Binary files a/public/favicon.ico and /dev/null differ
diff --git a/public/index.html b/public/index.html
index b8b0554..ceb4856 100755
--- a/public/index.html
+++ b/public/index.html
@@ -1,11 +1,17 @@
-
+
-
-
-
-
-
+
+
+
+
+
MyReads
diff --git a/src/BooksAPI.js b/src/BooksAPI.js
index 9cad1d9..b947c97 100755
--- a/src/BooksAPI.js
+++ b/src/BooksAPI.js
@@ -1,5 +1,5 @@
import SEARCH_API from "../secrets";
-const api = SEARCH_API;
+const api = "https://reactnd-books-api.udacity.com";
// Generate a unique token
let token = localStorage.token;
diff --git a/src/SearchPage.js b/src/SearchPage.js
index 67208e0..8cd0464 100644
--- a/src/SearchPage.js
+++ b/src/SearchPage.js
@@ -1,170 +1,353 @@
-import React, { Component } from 'react';
-import { Link } from 'react-router-dom'
-import { search } from './BooksAPI'
-import './search.css'
+import React, { Component } from "react";
+import { Link } from "react-router-dom";
+import { search } from "./BooksAPI";
+import "./search.css";
class SearchPage extends Component {
-
- constructor(){
+ constructor() {
super();
this.state = {
results: [],
- }
+ };
}
onSearch = (query) => {
- const books = this.props.books
+ const books = this.props.books;
if (query.length > 3) {
search(query).then((results) => {
if (results.error === undefined) {
for (var result of results) {
for (var book of books) {
if (result.title === book.title) {
- result.shelf = book.shelf
+ result.shelf = book.shelf;
}
}
}
this.setState({ results });
} else {
- this.setState({results: []})
+ this.setState({ results: [] });
}
- })
+ });
}
};
render() {
-
- const onSelect = this.props.onSelect
+ const onSelect = this.props.onSelect;
return (