From d208189515cc164bcfbed9a260f8b7f29cbe5677 Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Sat, 20 May 2023 18:21:37 -0500 Subject: [PATCH 1/2] Old edits never pushed --- .env | 1 + .gitignore | 3 +- README.md | 13 -- package.json | 3 + public/favicon.ico | Bin 24838 -> 0 bytes public/index.html | 18 +- src/BooksAPI.js | 2 +- src/SearchPage.js | 425 ++++++++++++++++++++++++++++++++------------- 8 files changed, 323 insertions(+), 142 deletions(-) create mode 100644 .env delete mode 100755 README.md delete mode 100755 public/favicon.ico 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 5c125de5d897c1ff5692a656485b3216123dcd89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24838 zcmeI4X^>UL6@VY56)S&I{`6Nu0RscW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YS ze}E>gUX+0YuF}B+Uhw2x7a7Q+oOzMNFHTNN<)40Rzg#`pABKF18@l}5A>RL`?Ri;Z zC8ExD$)im1@R{N7(wIog8$Yn(6%q$yd9(zKe};OnH%;mWBs7)>ls~T3Wi6!Xqw6+dpJLVS1P| z9qV%io-nE*rYcPxiS31>U_>mbPTXxkC*!?*zefr#2vF|qr8{|4|u^7-pD|f z&OPc->UKu)=iHgIpysp;Lsbyj}GJWoBkufOA={CRTUjr%af zc5pUH9{pg?M5%+)oN`q9yBbBt@+3xHV)qGm8b)Cp-w7~CwEhtBUk0rbjrqM zTb|tQ3-5-pw^cul`T+X&s?O;?V(FD!(Q9Qg@(LTCNz{0-vBM^SX5lti3|GpxFn4;Ax6pGc~t)R!Bo${lYH(* z!F&5X*?S&}YoDCyzwv1H+XI(+rL`;RN9}iLxlfr-r&vGG8OQa@=>+a)+Ij)sd_{wu z1Am(+3-RFr4&N8N6+hqo19S#;SA1-hG>07p3}&*j4CR+rqdV)^6n; z_vFr!(a%-=#=kb{pYmNL@6|DWkw~%E2V2jYl*e1}c{e$fib?(O+hs}eoBLRo&9(;J}YV}0Mi;LZAe{U$(s= zT<-IaV$Z+q-P!~3{HxN>Kbw30jXzM&I(S<6Ksx^}HvU2Vntb!etSsm0>)j}Me^+L5{2yz--)?W`Q?az z!WLG4UNP}+#C+NKH+ZG-Q=E>IPp%LuKLx$$8NAOGr(#~P>!EA zDYlpXDR=xM?Xv5(-qp74Cw3LzBeASHSBY`OezkbOyjP!G%WSymju_C$VBl--z + - - - - - + + + + + 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 (
- Close + + Close +
this.onSearch(e.target.value)} + onChange={(e) => this.onSearch(e.target.value)} />
    - { this.state.results.length > 0 && ( + {this.state.results.length > 0 && this.state.results.map((result) => { - return
  1. -
    -
    -
    -
    - -
    -
    -
    {result.title}
    -
    {result.authors ? result.authors : 'Author Unknown'}
    -
    -
  2. - }) - ) - } + return ( +
  3. +
    +
    +
    +
    + +
    +
    +
    {result.title}
    +
    + {result.authors ? result.authors : "Author Unknown"} +
    +
    +
  4. + ); + })}

Suggested search terms:

    -
  • Android
  • -
  • Art
  • -
  • Artificial Intelligence
  • -
  • Astronomy
  • -
  • Austen
  • -
  • Baseball
  • -
  • Basketball
  • -
  • Basketball
  • -
  • Bhagat
  • -
  • Basketball
  • -
  • Biography
  • -
  • Brief
  • -
  • Business
  • -
  • Camus
  • -
  • Cervantes
  • -
  • Christie
  • -
  • Classics
  • -
  • Comics
  • -
  • Cook
  • -
  • Cricket
  • -
  • Cycling
  • -
  • Desai
  • -
  • Design
  • -
  • Development
  • -
  • Digital Marketing
  • -
  • Drama
  • -
  • Drawing
  • -
  • Dumas
  • -
  • Education
  • -
  • Everything
  • -
  • Fantasy
  • -
  • Film
  • -
  • Finance
  • -
  • First
  • -
  • Fitness
  • -
  • Football
  • -
  • Future
  • -
  • Games
  • -
  • Gandhi
  • -
  • Homer
  • -
  • Horror
  • -
  • Hugo
  • -
  • Ibsen
  • -
  • Journey
  • -
  • Kafka
  • -
  • King
  • -
  • Lahiri
  • -
  • Larsson
  • -
  • Learn
  • -
  • Football
  • -
  • Literary Fiction
  • -
  • Make
  • -
  • Manage
  • -
  • Marquez
  • -
  • Money
  • -
  • Mystery
  • -
  • Negotiate
  • -
  • Painting
  • -
  • Philosophy
  • -
  • Photography
  • -
  • Poetry
  • -
  • Production
  • -
  • Programming
  • -
  • React
  • -
  • Redux
  • -
  • River
  • -
  • Robotics
  • -
  • Rowling
  • -
  • Satire
  • -
  • Science Fiction
  • -
  • Shakespeare
  • -
  • Singh
  • -
  • Swimming
  • -
  • Tale
  • -
  • Thrun
  • -
  • Time
  • -
  • Tolstoy
  • -
  • Travel
  • -
  • Ultimate
  • -
  • Virtual Reality
  • -
  • Web Development
  • -
  • Tolstoy
  • +
  • + Android +
  • +
  • + Art +
  • +
  • + Artificial Intelligence +
  • +
  • + Astronomy +
  • +
  • + Austen +
  • +
  • + Baseball +
  • +
  • + Basketball +
  • +
  • + Basketball +
  • +
  • + Bhagat +
  • +
  • + Basketball +
  • +
  • + Biography +
  • +
  • + Brief +
  • +
  • + Business +
  • +
  • + Camus +
  • +
  • + Cervantes +
  • +
  • + Christie +
  • +
  • + Classics +
  • +
  • + Comics +
  • +
  • + Cook +
  • +
  • + Cricket +
  • +
  • + Cycling +
  • +
  • + Desai +
  • +
  • + Design +
  • +
  • + Development +
  • +
  • + Digital Marketing +
  • +
  • + Drama +
  • +
  • + Drawing +
  • +
  • + Dumas +
  • +
  • + Education +
  • +
  • + Everything +
  • +
  • + Fantasy +
  • +
  • + Film +
  • +
  • + Finance +
  • +
  • + First +
  • +
  • + Fitness +
  • +
  • + Football +
  • +
  • + Future +
  • +
  • + Games +
  • +
  • + Gandhi +
  • +
  • + Homer +
  • +
  • + Horror +
  • +
  • + Hugo +
  • +
  • + Ibsen +
  • +
  • + Journey +
  • +
  • + Kafka +
  • +
  • + King +
  • +
  • + Lahiri +
  • +
  • + Larsson +
  • +
  • + Learn +
  • +
  • + Football +
  • +
  • + Literary Fiction +
  • +
  • + Make +
  • +
  • + Manage +
  • +
  • + Marquez +
  • +
  • + Money +
  • +
  • + Mystery +
  • +
  • + Negotiate +
  • +
  • + Painting +
  • +
  • + Philosophy +
  • +
  • + Photography +
  • +
  • + Poetry +
  • +
  • + Production +
  • +
  • + Programming +
  • +
  • + React +
  • +
  • + Redux +
  • +
  • + River +
  • +
  • + Robotics +
  • +
  • + Rowling +
  • +
  • + Satire +
  • +
  • + Science Fiction +
  • +
  • + Shakespeare +
  • +
  • + Singh +
  • +
  • + Swimming +
  • +
  • + Tale +
  • +
  • + Thrun +
  • +
  • + Time +
  • +
  • + Tolstoy +
  • +
  • + Travel +
  • +
  • + Ultimate +
  • +
  • + Virtual Reality +
  • +
  • + Web Development +
  • +
  • + Tolstoy +
- ) + ); } } -export default SearchPage +export default SearchPage; From 51241e95e74a5de39d5d54c42e5076c0c9f20f0d Mon Sep 17 00:00:00 2001 From: Kenneth Jannette Date: Thu, 27 Feb 2025 07:54:21 -0500 Subject: [PATCH 2/2] more --- .env | 1 - package.json | 4 ++-- src/App.js | 6 +++--- src/SearchPage.js | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 3da9eb9..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -PUBLIC_URL=http://www.findandexec.com/bb \ No newline at end of file diff --git a/package.json b/package.json index 7cd8497..92f2529 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "bb", - "homepage": "http://www.execfunc.com/bb", + "name": "browse", + "homepage": ".", "version": "1.0", "dependencies": { "babel-cli": "^6.26.0", diff --git a/src/App.js b/src/App.js index e26706d..2911774 100755 --- a/src/App.js +++ b/src/App.js @@ -1,5 +1,5 @@ import React from "react"; -import { Router } from "react-router-dom"; +import { BrowserRouter } from "react-router-dom"; import { Link, Route } from "react-router-dom"; import Bookshelf from "./Bookshelf"; import createHistory from "history/createBrowserHistory"; @@ -56,7 +56,7 @@ class BooksApp extends React.Component { render() { return ( - +
Search for Books
-
+ ); } } diff --git a/src/SearchPage.js b/src/SearchPage.js index 8cd0464..e189c44 100644 --- a/src/SearchPage.js +++ b/src/SearchPage.js @@ -37,7 +37,7 @@ class SearchPage extends Component { return (
- + Close