export function getTotalCartPrices(cart) {
if (!cart) return null
return {
price: cart.totalAmount,
discount: cart.lines.reduce((acc, line) => {
return (
acc + line.price.amount * edge.quantity
)
}, 0)
}
}
export function getCartProductsQuantity(cart) {
return ...
}
...