changed anchor tag to <Link> on main page
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { BrowserRouter, Route } from 'react-router-dom'
|
||||
import { BrowserRouter, Link, Route } from 'react-router-dom'
|
||||
// import * as BooksAPI from './BooksAPI'
|
||||
import Bookshelf from './Bookshelf'
|
||||
import SearchPage from './SearchPage'
|
||||
@@ -31,7 +31,7 @@ class BooksApp extends React.Component {
|
||||
)}/>
|
||||
|
||||
<div className="open-search">
|
||||
<a onClick={() => this.setState({ showSearchPage: true })}>Add a book</a>
|
||||
<Link to="/search">Add a book</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -3,8 +3,6 @@ import React, { Component } from 'react';
|
||||
class Bookshelf extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div> Bookshelf </div>
|
||||
/*
|
||||
<div className="list-books">
|
||||
<div className="list-books-title">
|
||||
<h1>MyReads</h1>
|
||||
@@ -161,7 +159,6 @@ class Bookshelf extends Component {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
*/
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,31 +3,28 @@ import React, { Component } from 'react';
|
||||
class SearchPage extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div>SearchPage</div>
|
||||
/*
|
||||
<div className="search-books">
|
||||
<div className="search-books-bar">
|
||||
<a className="close-search" onClick={() => this.setState({ showSearchPage: false })}>Close</a>
|
||||
<div className="search-books-input-wrapper">
|
||||
{
|
||||
NOTES: The search from BooksAPI is limited to a particular set of search terms.
|
||||
You can find these search terms here:
|
||||
https://github.com/udacity/reactnd-project-myreads-starter/blob/master/SEARCH_TERMS.md
|
||||
|
||||
However, remember that the BooksAPI.search method DOES search by title or author. So, don't worry if
|
||||
you don't find a specific author or title. Every search is limited by search terms.
|
||||
}
|
||||
<input type="text" placeholder="Search by title or author"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div className="search-books-results">
|
||||
<ol className="books-grid"></ol>
|
||||
</div>
|
||||
</div>
|
||||
*/
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default SearchPage
|
||||
|
||||
/*
|
||||
NOTES: The search from BooksAPI is limited to a particular set of search terms.
|
||||
You can find these search terms here:
|
||||
https://github.com/udacity/reactnd-project-myreads-starter/blob/master/SEARCH_TERMS.md
|
||||
|
||||
However, remember that the BooksAPI.search method DOES search by title or author. So, don't worry if
|
||||
you don't find a specific author or title. Every search is limited by search terms.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user