import React from "react"; import { useProduct } from "vtex.product-context"; import styles from "./Installment.module.css"; const Installment = () => { const skuProduct = useProduct(); console.log(skuProduct); const productInstallment: any = { numberOfInstallment: skuProduct?.selectedItem?.sellers[0].commertialOffer.Installments[3] .NumberOfInstallments, value: skuProduct?.selectedItem?.sellers[0].commertialOffer.Installments[3] .Value, }; return (
{productInstallment.numberOfInstallment}x{" "} de {""} R${" "} {productInstallment.value?.toFixed(2).toString().replace(".", ",")}{" "} sem juros
); }; export default Installment;