x
This commit is contained in:
1 parent
ed69a4b840
commit
992335a52b
22 files changed
+1064
-346
No files matched your search
@@ -21,7 +21,7 @@ export default function ProductCard({ product }: ProductCardProps) {
|
||||
const [selectedVariant, setSelectedVariant] = useState(product.variants?.[0] || null)
|
||||
|
||||
const categoryName = resolveCategoryName(product.category, lang)
|
||||
const productName = resolveLocalized(product.name, lang) || product.scent.name
|
||||
const productName = resolveLocalized(product.name, lang) || product.brand.name
|
||||
const imageUrl = product.images?.[0]?.url || product.category.imageUrl || getCategoryImage(categoryName)
|
||||
const displayPrice = selectedVariant?.price ?? product.variants[0]?.price ?? product.price
|
||||
|
||||
@@ -88,7 +88,7 @@ export default function ProductCard({ product }: ProductCardProps) {
|
||||
: 'border-line-primary/20 bg-surface-card text-text-main hover:border-brand-primary/50'
|
||||
}`}
|
||||
>
|
||||
{variant.size}
|
||||
{[variant.option1, variant.option2, variant.option3].filter(Boolean).join(' / ')}
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
@@ -114,7 +114,7 @@ export default function ProductCard({ product }: ProductCardProps) {
|
||||
quantity: 1,
|
||||
price: selectedVariant.price || 0,
|
||||
productName: productName,
|
||||
variantSize: selectedVariant.size,
|
||||
variantSize: [selectedVariant.option1, selectedVariant.option2, selectedVariant.option3].filter(Boolean).join(' / '),
|
||||
productImage: imageUrl
|
||||
})
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user