added old price amount
This commit is contained in:
@@ -42,6 +42,7 @@ type ProductCardProps = {
|
||||
id: number;
|
||||
name: string;
|
||||
price: number | null;
|
||||
oldPrice: number | null;
|
||||
struct_price_text: string;
|
||||
discount?: number | null;
|
||||
discount_text?: string | null;
|
||||
@@ -58,6 +59,7 @@ export default function ProductCard({
|
||||
id,
|
||||
name,
|
||||
price,
|
||||
oldPrice,
|
||||
struct_price_text,
|
||||
images,
|
||||
labels = [],
|
||||
@@ -375,13 +377,18 @@ export default function ProductCard({
|
||||
</h3>
|
||||
|
||||
{/* Price */}
|
||||
<div className="flex items-baseline gap-2">
|
||||
<div className="flex items-baseline gap-1">
|
||||
<p
|
||||
className="text-2xl font-bold tracking-tight"
|
||||
className="text-xl font-bold tracking-tight"
|
||||
style={{ color: price_color }}
|
||||
>
|
||||
{struct_price_text}
|
||||
</p>
|
||||
{oldPrice && (
|
||||
<span className="text-sm text-gray-400 line-through ">
|
||||
{oldPrice} TMT
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex gap-2 items-center">
|
||||
{/* Favorite Button */}
|
||||
|
||||
Reference in New Issue
Block a user