Skip to content

Commit

Permalink
Updated MovieBrowser and MovieWishlist to use the new Header component
Browse files Browse the repository at this point in the history
  • Loading branch information
Erin Doyle committed Sep 2, 2018
1 parent acdce32 commit c7ffccb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
14 changes: 4 additions & 10 deletions src/browse/MovieBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import React from 'react';
import PropTypes from 'prop-types';
import { NavLink } from 'react-router-dom';

import movies from '../movies';
import Header from '../primitives/Header';

import BrowseList from './BrowseList';
import getBrowseActions from './getBrowseActions';

import movies from '../movies';


const MovieBrowser = ({
history,
Expand All @@ -21,14 +22,7 @@ const MovieBrowser = ({

return (
<div>
<header>
<nav className="navbar navbar-dark bg-primary">
<span className="navbar-text">
<h1>Browse Movies</h1>
</span>
<button className="btn btn-outline-secondary" onClick={goToWishlist}>Back</button>
</nav>
</header>
<Header title="Browse Movies" buttonText="Back" handleButtonClick={goToWishlist} />

<main>
<ul className="nav nav-pills nav-justified">
Expand Down
9 changes: 3 additions & 6 deletions src/wishlist/MovieWishlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { NavLink, Link } from 'react-router-dom';

import Header from '../primitives/Header';

import WishList from './WishList';
import getWishlistActions from './getWishlistActions';
import MovieEditor from './MovieEditor';
Expand Down Expand Up @@ -60,12 +62,7 @@ class MovieWishlist extends Component {

return (
<div>
<header className="navbar navbar-dark bg-primary">
<span className="navbar-text">
<h1>Movie Wishlist</h1>
</span>
<button className="btn btn-outline-secondary" onClick={goToBrowse}>Add</button>
</header>
<Header title="Movie Wishlist" buttonText="Add" handleButtonClick={goToBrowse} />

<main>
<ul className="nav nav-pills nav-justified">
Expand Down

0 comments on commit c7ffccb

Please sign in to comment.