{"size": 569, "ext": "js", "max_stars_repo_path": "src/components/Books/Books.js", "max_stars_repo_name": "HectorTorresE/BookStore", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Books/Books.js", "max_issues_repo_name": "HectorTorresE/BookStore", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Books/Books.js", "max_forks_repo_name": "HectorTorresE/BookStore", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.6206896552, "max_line_length": 44, "alphanum_fraction": 0.553602812}
import PropTypes from 'prop-types';
import Book from '../Book/Book';
import './Books.css';

const Books = ({ books }) => (
  <div className="container">
    {
      books.map((book) => (
        <Book
          title={book.title}
          key={book.id}
          author={book.author}
          id={book.id}
          genre={book.genre}
        />
      ))
    }
  </div>
);

Books.propTypes = {
  books: PropTypes.arrayOf(PropTypes.shape({
    id: PropTypes.string,
    title: PropTypes.string,
    author: PropTypes.string,
  })).isRequired,
};
export default Books;
