added old price amount

This commit is contained in:
@jcarymuhammedow
2026-03-18 12:32:49 +05:00
parent 69e3e2e0ab
commit a3a02ef756
9 changed files with 27 additions and 4 deletions

View File

@@ -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 */}