File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ;
You can’t perform that action at this time.
0 commit comments