import React from 'react' import { useProduct } from 'vtex.product-context' import { useCssHandles } from 'vtex.css-handles' import './pix.css' const Pix = () => { const CSS_HANDLES = ['pixwrapper', 'pixPrice'] const handles = useCssHandles(CSS_HANDLES) const product = useProduct() const productPrice = product?.selectedItem?.sellers[0].commertialOffer.Price let descontoPixValue = 0 if (productPrice) descontoPixValue = productPrice * 0.9 return ( <>
image-pix
R$ {descontoPixValue.toFixed(2).toString().replace('.', ',')}

10 % de desconto

) } export default Pix