Update content.tsx

This commit is contained in:
NotII
2025-02-28 00:59:27 +00:00
parent fcc1218dd9
commit fd31b461ce

View File

@@ -131,23 +131,17 @@ export default function Content({ username, orderStats }: ContentProps) {
<div className="flex items-center gap-3">
<div className="h-12 w-12 rounded-md bg-muted flex items-center justify-center">
{product.image ? (
<img src={product.image} alt={product.name} className="h-10 w-10 object-cover rounded-md" />
<img src={`https://internal-api.inboxi.ng/api/products/${product.id}/image`} alt={product.name} className="h-10 w-10 object-cover rounded-md" />
) : (
<ShoppingCart className="h-5 w-5 text-muted-foreground" />
)}
</div>
<div>
<p className="font-medium">{product.name}</p>
<p className="text-sm text-muted-foreground">
${product.price.toLocaleString('en-US', { minimumFractionDigits: 2 })}
</p>
</div>
</div>
<div className="text-right">
<p className="font-bold">{product.count} sold</p>
<p className="text-sm text-muted-foreground">
${product.revenue?.toLocaleString('en-US', { minimumFractionDigits: 2 }) || '-'}
</p>
</div>
</div>
))}