forked from M3-Academy/challenge-vtex-io
Entrega do Desafio #1
@ -4,11 +4,8 @@ import styles from "./styles.css";
|
|||||||
|
|
||||||
const Pix = () => {
|
const Pix = () => {
|
||||||
const product = useProduct();
|
const product = useProduct();
|
||||||
console.log(product)
|
|
||||||
const pix = {
|
const pix = {
|
||||||
pixValue: Number(
|
pixValue: Number(product?.selectedItem?.sellers[0].commertialOffer.Price),
|
||||||
product?.selectedItem?.sellers[0].commertialOffer.Price
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
const discount = pix.pixValue * 0.1;
|
const discount = pix.pixValue * 0.1;
|
||||||
const pixPrice = pix.pixValue - discount;
|
const pixPrice = pix.pixValue - discount;
|
||||||
|
Loading…
Reference in New Issue
Block a user