File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ export const Featured = ({
1212 products : Product [ ] ;
1313 locale : string ;
1414} ) => {
15+ const [ firstProduct , secondProduct , thirdProduct ] = products ;
16+
1517 return (
1618 < div className = "py-20" >
1719 < h2 className = "text-2xl md:text-4xl font-medium bg-clip-text text-transparent bg-gradient-to-b from-neutral-800 via-white to-white mb-2" >
@@ -22,11 +24,17 @@ export const Featured = ({
2224 </ p >
2325 < div className = "grid grid-cols-1 md:grid-cols-3 gap-10" >
2426 < div className = "md:col-span-2" >
25- < FeaturedItem product = { products [ 0 ] } locale = { locale } />
27+ { firstProduct ? (
28+ < FeaturedItem product = { firstProduct } locale = { locale } />
29+ ) : null }
2630 </ div >
2731 < div className = "grid gap-10" >
28- < FeaturedItem product = { products [ 1 ] } locale = { locale } />
29- < FeaturedItem product = { products [ 2 ] } locale = { locale } />
32+ { secondProduct ? (
33+ < FeaturedItem product = { secondProduct } locale = { locale } />
34+ ) : null }
35+ { thirdProduct ? (
36+ < FeaturedItem product = { thirdProduct } locale = { locale } />
37+ ) : null }
3038 </ div >
3139 </ div >
3240 < div className = "grid grid-cols-1 md:grid-cols-3 gap-10" > </ div >
You can’t perform that action at this time.
0 commit comments