update
This commit is contained in:
@@ -56,10 +56,13 @@ export default function ProductDetailScreen() {
|
||||
const fixedProduct = {
|
||||
...p,
|
||||
prices:
|
||||
p.prices?.map((pr: any) => ({
|
||||
quantity: parseFloat(String(pr.quantity)),
|
||||
price: parseFloat(String(pr.price)),
|
||||
})) || [],
|
||||
p.prices
|
||||
?.filter((pr: any) => pr.active_price !== false)
|
||||
.map((pr: any) => ({
|
||||
quantity: parseFloat(String(pr.quantity)),
|
||||
price: parseFloat(String(pr.price)),
|
||||
active_price: pr.active_price,
|
||||
})) || [],
|
||||
};
|
||||
setProduct(fixedProduct);
|
||||
if (fixedProduct.prices.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user