import React from 'react'; import { useProduct } from 'vtex.product-context'; import styles from './styles.css'; const Pix = () => { const productContextValue = useProduct(); //console.log(productContextValue); const price = productContextValue?.product?.priceRange?.sellingPrice?.lowPrice; const discount = (Number(price) * (10 / 100)); const pixValue = (Number(price) - Number(discount)); return ( <>
R$ {pixValue.toFixed(2).replace("." , ",")}
10 % de desconto