import React from "react";
import styles from "./styles.css";
import { useProduct } from "vtex.product-context";
export default function Prices() {
const product = useProduct();
console.log(product);
return (
R${" "}
{product?.selectedItem?.sellers[0].commertialOffer.Installments[3].TotalValuePlusInterestRate.toString().replace(
".",
","
)}{" "}
{
product?.selectedItem?.sellers[0].commertialOffer.Installments[3]
.NumberOfInstallments
}{" "}
x
de
R${" "}
{product?.selectedItem?.sellers[0].commertialOffer.Installments[3].Value.toString().replace(
".",
","
)}
sem juros
R${" "}
{(
Number(
product?.selectedItem?.sellers[0].commertialOffer
.Installments[0].TotalValuePlusInterestRate
) * 0.9
)
.toFixed(2)
.toString()
.replace(".", ",")}
10 % de desconto
);
}