Skip to content

Commit

Permalink
Merge pull request #3 from aribray/app_refactor
Browse files Browse the repository at this point in the history
App refactor
  • Loading branch information
amythetester authored Jun 26, 2019
2 parents 0e7b852 + 3191328 commit 7b242f4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
32 changes: 23 additions & 9 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,29 @@ class App extends Component {
render() {
return (
<div>
<header>
{/* <Search /> */}
<button onClick={this.showMovieToggle}>Show Movies</button>
<button onClick={this.showCustomerToggle}>Show Customers</button>
</header>
<main>
{this.state.showCustomers && <CustomerList />}
{this.state.showMovies && <RentalLibrary />}
</main>
<Router>
<div>
<nav>
<ul>
{/* <Search /> */}
<li>
<Link to="/movies" className="movies">Movies</Link>
</li>
<li>
<Link to="/customers" className="customers">Customers</Link>
</li>
{/* <button onClick={this.showMovieToggle}>Show Movies</button>
<button onClick={this.showCustomerToggle}>Show Customers</button> */}
</ul>
</nav>
</div>
<main>
<Route path="/movies" component={RentalLibrary} />
<Route path="/customers" component={CustomerList} />
{/* {this.state.showCustomers && <CustomerList />}
{this.state.showMovies && <RentalLibrary />} */}
</main>
</Router>
</div>
);
// return (
Expand Down
2 changes: 0 additions & 2 deletions src/components/Customer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import PropTypes from 'prop-types';

const Customer = (props) => {



return (
<div className="customer">
<div className="content">
Expand Down

0 comments on commit 7b242f4

Please sign in to comment.