diff --git a/marketplace/src/components/ProductCard.tsx b/marketplace/src/components/ProductCard.tsx index efd4145..06fb799 100644 --- a/marketplace/src/components/ProductCard.tsx +++ b/marketplace/src/components/ProductCard.tsx @@ -1,4 +1,5 @@ import { ProductWithDistance } from '../types/product' +import { formatCents } from '../utils/format' interface ProductCardProps { product: ProductWithDistance @@ -38,7 +39,7 @@ export const ProductCard = ({ product, onAddToCart }: ProductCardProps) => {
Itens: {summary.totalItems}
-R$ {summary.totalValue.toFixed(2)}
+R$ {formatCurrency(summary.totalValue)}
Preço
-R$ {item.unitPrice.toFixed(2)}
+R$ {formatCurrency(item.unitPrice)}
Subtotal
- R$ {(item.quantity * item.unitPrice).toFixed(2)} + R$ {formatCurrency(item.quantity * item.unitPrice)}