Add wishlist pages in navbar
This commit is contained in:
parent
80ed83aeba
commit
4a497b024e
@ -83,6 +83,9 @@ const MovieListPopular = (props) => (
|
||||
const MovieListPolochon = (props) => (
|
||||
<MovieList {...props} moviesUrl='/movies/polochon'/>
|
||||
)
|
||||
const MovieListWishlisted = (props) => (
|
||||
<MovieList {...props} moviesUrl='/wishlist/movies'/>
|
||||
)
|
||||
const MovieListSearch = (props) => (
|
||||
<MovieList {...props} />
|
||||
)
|
||||
@ -93,6 +96,9 @@ const ShowListPopular = (props) => (
|
||||
const ShowListPolochon = (props) => (
|
||||
<ShowList {...props} showsUrl='/shows/polochon'/>
|
||||
)
|
||||
const ShowListWishlisted = (props) => (
|
||||
<MovieList {...props} moviesUrl='/wishlist/shows'/>
|
||||
)
|
||||
const ShowDetailsView = (props) => (
|
||||
<ShowDetails {...props} />
|
||||
)
|
||||
@ -111,9 +117,11 @@ ReactDOM.render((
|
||||
<Route path="/movies/search/:search" component={UserIsAuthenticated(MovieListSearch)} />
|
||||
<Route path="/movies/popular" component={UserIsAuthenticated(MovieListPopular)} />
|
||||
<Route path="/movies/polochon" component={UserIsAuthenticated(MovieListPolochon)} />
|
||||
<Route path="/movies/wishlist" component={UserIsAuthenticated(MovieListWishlisted)} />
|
||||
<Route path="/shows/search/:search" component={UserIsAuthenticated(ShowListSearch)} />
|
||||
<Route path="/shows/popular" component={UserIsAuthenticated(ShowListPopular)} />
|
||||
<Route path="/shows/polochon" component={UserIsAuthenticated(ShowListPolochon)} />
|
||||
<Route path="/shows/wishlist" component={UserIsAuthenticated(ShowListWishlisted)} />
|
||||
<Route path="/shows/details/:imdbId" component={UserIsAuthenticated(ShowDetailsView)} />
|
||||
</Route>
|
||||
</Router>
|
||||
|
@ -19,6 +19,7 @@ export default function NavBar(props) {
|
||||
<Navbar.Collapse>
|
||||
<MoviesDropdown />
|
||||
<ShowsDropdown />
|
||||
<WishlistDropdown />
|
||||
<UserDropdown
|
||||
username={props.userStore.username}
|
||||
logout={props.userLogout}
|
||||
@ -134,3 +135,18 @@ function UserDropdown(props) {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function WishlistDropdown(props) {
|
||||
return(
|
||||
<Nav>
|
||||
<NavDropdown title="Wishlist" id="navbar-wishlit-dropdown">
|
||||
<LinkContainer to="/movies/wishlist">
|
||||
<MenuItem>Movies</MenuItem>
|
||||
</LinkContainer>
|
||||
<LinkContainer to="/shows/wishlist">
|
||||
<MenuItem>Shows</MenuItem>
|
||||
</LinkContainer>
|
||||
</NavDropdown>
|
||||
</Nav>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user