import MovieCard, { IMovieCardItem } from "./MovieCard";

interface IMovieListProps {
  movies: Array<IMovieCardItem>;
}

export default ({ movies }: IMovieListProps) => {
  return (
    <div className="container m-auto">
      <div className={`p-4 flex justify-start flex-wrap gap-4`}>
        {movies.map((m) => (
          <div className="WrapItem" key={m.imdbID}>
            <MovieCard movie={m} />
          </div>
        ))}
      </div>
    </div>
  );
};
