20 lines
443 B
TypeScript
20 lines
443 B
TypeScript
import React from "react";
|
|
import type { Product } from "../../types/product";
|
|
import ProductCard from "./ProductCard";
|
|
import styles from "./Catalog.module.css";
|
|
|
|
interface Props {
|
|
products: Product[];
|
|
}
|
|
|
|
const ProductGrid: React.FC<Props> = ({ products }) => {
|
|
return (
|
|
<div className={styles.grid}>
|
|
{products.map((p) => (
|
|
<ProductCard key={p.id} product={p} />
|
|
))}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default ProductGrid; |