forked from crowetic/commerce
Update normalize.ts
This commit is contained in:
parent
32184ecdbd
commit
9783537ca2
@ -92,9 +92,7 @@ export function normalizeCart(data: Checkout): Cart {
|
|||||||
lineItemsSubtotalPrice: data.subtotalPrice,
|
lineItemsSubtotalPrice: data.subtotalPrice,
|
||||||
subtotalPrice: data.subtotalPrice,
|
subtotalPrice: data.subtotalPrice,
|
||||||
totalPrice: data.totalPrice,
|
totalPrice: data.totalPrice,
|
||||||
discounts: data.discountApplications?.edges.map(({ value }: any) => ({
|
discounts: [],
|
||||||
value,
|
|
||||||
})),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,8 +117,6 @@ function normalizeLineItem({
|
|||||||
listPrice: variant?.compareAtPrice,
|
listPrice: variant?.compareAtPrice,
|
||||||
},
|
},
|
||||||
path: '',
|
path: '',
|
||||||
discounts: item.discountAllocations.map(({ value }: any) => ({
|
discounts: [],
|
||||||
value,
|
|
||||||
})),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user