feat: اضافه کردن قابلیت کلیک روی تصاویر carousel و banners برای هدایت به لینک مربوطه
This commit is contained in:
@@ -84,14 +84,33 @@ const ProductCard: FC<Props> = ({ item }) => {
|
||||
}
|
||||
</div> */}
|
||||
|
||||
<div className='mt-4 sm:mt-5 text-xs sm:text-sm'>
|
||||
{NumberFormat(item.default_variant.price.selling_price)} تومان
|
||||
</div>
|
||||
<div className='mt-1 text-xs sm:text-sm text-[#7F7F7F] line-through'>
|
||||
{NumberFormat(item.default_variant.price.retailPrice)}
|
||||
<div className='flex items-center justify-between mt-4 sm:mt-5'>
|
||||
<div className='flex flex-col gap-1'>
|
||||
<div className='text-xs sm:text-sm font-bold'>
|
||||
{item.default_variant.price.selling_price && item.default_variant.price.selling_price > 0
|
||||
? `${NumberFormat(item.default_variant.price.selling_price)} تومان`
|
||||
: 'بدون قیمت'
|
||||
}
|
||||
</div>
|
||||
{((item.default_variant.price.discount_percent > 0 && item.default_variant.price.selling_price > 0) ||
|
||||
(item.default_variant.price.is_specialSale && item.default_variant.price.selling_price > 0)) && (
|
||||
<div className='text-xs sm:text-sm text-[#7F7F7F] line-through'>
|
||||
{NumberFormat(item.default_variant.price.retailPrice)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{((item.default_variant.price.discount_percent > 0 && item.default_variant.price.selling_price > 0) ||
|
||||
(item.default_variant.price.is_specialSale && item.default_variant.price.selling_price > 0)) && (
|
||||
<div className='bg-red-500 text-white text-xs px-2 py-1 rounded-full'>
|
||||
{item.default_variant.price.discount_percent > 0
|
||||
? `${item.default_variant.price.discount_percent}%`
|
||||
: 'فروش ویژه'
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className='flex justify-end'>
|
||||
<div className='flex justify-end mt-3'>
|
||||
<Heart onClick={handleWish} variant={isWished ? 'Bold' : 'Outline'} size={20} color='#000' />
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user