This commit is contained in:
2026-05-15 16:45:56 +02:00
parent 921c861311
commit 04671637d2
8 changed files with 70 additions and 25 deletions
+3 -2
View File
@@ -48,7 +48,8 @@ export default function ProductCard({ product, onPress, categoryColor }: Product
const { addToCart } = useCart();
const catColor = categoryColor ?? colors.accent;
const isSoldOut = product.stock <= 0;
const firstPrice = product.prices?.[0]?.price ?? null;
const activePrices = product.prices?.filter((p) => p.active_price !== false) ?? [];
const firstPrice = activePrices[0]?.price ?? null;
const imageMedia = product.media?.find((m) => m.type === "image");
const videoMedia = product.media?.find((m) => m.type === "video");
@@ -267,7 +268,7 @@ export default function ProductCard({ product, onPress, categoryColor }: Product
style={styles.pickerScroll}
showsVerticalScrollIndicator={false}
>
{product.prices?.map((p) => (
{activePrices.map((p) => (
<TouchableOpacity
key={p.quantity}
style={[