File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
src/routes/category/components/product-card Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ interface ProductCardProps {
55 product : Product ;
66}
77
8+ const stickerCategoryId = 3 ;
9+
810export function ProductCard ( { product } : ProductCardProps ) {
9- const isSticker = product . categoryId === 3 ;
11+
12+ const isSticker = stickerCategoryId ;
1013
1114 return (
1215 < >
@@ -27,13 +30,16 @@ export function ProductCard({ product }: ProductCardProps) {
2730 < div className = "flex grow flex-col gap-2 p-4" >
2831 < h2 className = "text-sm font-medium" > { product . title } </ h2 >
2932 < p className = "text-sm text-muted-foreground" > { product . description } </ p >
30- { isSticker && (
33+ { isSticker ? (
3134 < div className = "text-xs text-muted-foreground" >
32- < p className = "text-base font-semibold text-accent-foreground" > Desde</ p >
33- < p className = "font-medium text-foreground text-base" > S/{ product . minPrice } - S/{ product . maxPrice } p>
35+ < p className = "text-base font-semibold text-accent-foreground" >
36+ Desde
37+ </ p >
38+ < p className = "font-medium text-foreground text-base" >
39+ S/{ product . minPrice } - S/{ product . maxPrice }
40+ </ p >
3441 </ div >
35- )}
36- { ! isSticker && (
42+ ) : (
3743 < p className = "mt-auto text-base font-medium" > S/{ product . price } </ p >
3844 ) }
3945 </ div >
You can’t perform that action at this time.
0 commit comments