Skip to content

Commit ffa86be

Browse files
committed
add ProductGrid component
1 parent 4076627 commit ffa86be

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
import ProductCard from './ProductCard';
3+
4+
const ProductGrid = ({ products, onProductClick }) => {
5+
return (
6+
<div className="main-content">
7+
<div className="content-header">
8+
<div className="breadcrumb">
9+
Home / Men Footwear
10+
<span className="count"> - {products.length} items</span>
11+
</div>
12+
13+
<div className="sort-dropdown">
14+
<select defaultValue="recommended">
15+
<option value="recommended">Select Sorting Options</option>
16+
<option value="popular">Price: Low to High</option>
17+
<option value="newest">Price: High to Low</option>
18+
<option value="rating">New Arrivals</option>
19+
</select>
20+
</div>
21+
</div>
22+
23+
<div className="product-grid">
24+
{products.map((product) => (
25+
<ProductCard key={product.id} product={product} onClick={onProductClick} />
26+
))}
27+
</div>
28+
29+
{products.length === 0 && (
30+
<div className="no-products">
31+
<h3>No products found match the selected filters.</h3>
32+
<p>Try adjusting your categories or themes.</p>
33+
</div>
34+
)}
35+
36+
</div>
37+
);
38+
};
39+
40+
export default ProductGrid;

0 commit comments

Comments
 (0)