update
This commit is contained in:
@@ -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={[
|
||||
|
||||
Reference in New Issue
Block a user