import React from "react"; import { useProduct } from "vtex.product-context"; import styles from "./styles.css"; const Pix = () => { const product = useProduct(); const pix = { pixValue: Number( product?.selectedItem?.sellers[0].commertialOffer.Installments[3] .TotalValuePlusInterestRate ), }; const pixPrice = (pix.pixValue = pix.pixValue * 0.9) .toFixed(2) .toString() .replace(".", ","); return ( <>
R${pixPrice} 10% de desconto