Created
November 11, 2016 18:18
-
-
Save mauricedb/7e1ee723e6234b2c508ea2cf05e24163 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import GenreRowMovie from './genre-row-movie'; | |
import './genre-row.css'; | |
class GenreRow extends Component { | |
render() { | |
const { genre, movies, startPlaying } = this.props; | |
return ( | |
<div className="row genre-row"> | |
<h2>{genre}</h2> | |
{movies.slice(0, 6).map(movie => ( | |
<GenreRowMovie | |
key={movie.id} | |
movie={movie} | |
expandMovie={this.expandMovie} | |
/>))} | |
</div> | |
); | |
} | |
} | |
GenreRow.propTypes = { | |
genre: PropTypes.string.isRequired, | |
movies: PropTypes.array.isRequired, | |
startPlaying: PropTypes.func.isRequired, | |
}; | |
export default GenreRow; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment