import { type Book } from './Book';

type Props = {
  books: Book[];
};

const BooksList: React.FC<Props> = ({ books }) => {
  return (
    <ul>
      {books.map((book) => (
        <li key={book.id} data-testid="book">
          {book.title}
        </li>
      ))}
    </ul>
  );
};

export default BooksList;
