import styles from "./styles.module.css";
import { IReview } from "@/data/reviews";
import Review from "./Review";

interface IReviewsProps {
  reviews: IReview[];
}

function Reviews({ reviews }: IReviewsProps) {
  return (
    <div className={styles.reviews}>
      <ul>
        {reviews.map((review, index) => (
          <li key={index}>
            <Review {...review} />
          </li>
        ))}
      </ul>
    </div>
  );
}

export default Reviews;
