chore: fix unit
This commit is contained in:
@@ -366,6 +366,7 @@ export interface Product {
|
||||
description?: string;
|
||||
category: string;
|
||||
stock: number;
|
||||
unit?: string;
|
||||
prices?: ProductPrice[];
|
||||
media?: Array<{
|
||||
// ✅ CHANGÉ
|
||||
|
||||
@@ -27,6 +27,7 @@ interface ProductCardProps {
|
||||
name: string;
|
||||
category: string;
|
||||
stock: number;
|
||||
unit?: string;
|
||||
prices?: Array<{ quantity: number; price: number }>;
|
||||
media?: Array<{ url: string; type: string }>;
|
||||
};
|
||||
@@ -289,7 +290,7 @@ export default function ProductCard({ product, onPress }: ProductCardProps) {
|
||||
{ color: colors.textWhite },
|
||||
]}
|
||||
>
|
||||
{p.quantity}g
|
||||
{p.quantity}{product.unit || "g"}
|
||||
</Text>
|
||||
<Text
|
||||
style={[
|
||||
|
||||
@@ -529,7 +529,7 @@ export default function ProductDetailScreen() {
|
||||
<View style={styles.priceIndicator} />
|
||||
<Text style={styles.priceText}>
|
||||
{selectedPrice.toFixed(2)} €{" "}
|
||||
{selectedGrams && `pour ${selectedGrams}g`}
|
||||
{selectedGrams && `pour ${selectedGrams}${product.unit || "g"}`}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
@@ -557,7 +557,7 @@ export default function ProductDetailScreen() {
|
||||
>
|
||||
<Text style={styles.dropdownText}>
|
||||
{selectedGrams !== null
|
||||
? `${selectedGrams}g - ${selectedPrice.toFixed(2)} €`
|
||||
? `${selectedGrams}${product.unit || "g"} - ${selectedPrice.toFixed(2)} €`
|
||||
: "Choisir une quantite"}
|
||||
</Text>
|
||||
<Ionicons
|
||||
@@ -645,7 +645,7 @@ export default function ProductDetailScreen() {
|
||||
},
|
||||
]}
|
||||
>
|
||||
{p.quantity}g
|
||||
{p.quantity}{product.unit || "g"}
|
||||
</Text>
|
||||
<Text
|
||||
style={[
|
||||
|
||||
Reference in New Issue
Block a user