forked from M3-Academy/challenge-vtex-io
Entrega do Desafio #1
@ -1,16 +1,15 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { useProduct } from "vtex.product-context";
|
import { useProduct } from "vtex.product-context";
|
||||||
import styles from "./InstallmentProduct.module.css";
|
import styles from "./styles.css";
|
||||||
|
|
||||||
const InstallmentProduct = () => {
|
const InstallmentProduct = () => {
|
||||||
const product = useProduct();
|
const product = useProduct();
|
||||||
|
|
||||||
const productWithInstallments = {
|
const productWithInstallments = {
|
||||||
numberOfInstallments:
|
numberOfInstallments:
|
||||||
product?.selectedItem?.sellers[0].commertialOffer.Installments[10]
|
product?.selectedItem?.sellers[0].commertialOffer.Installments[3]
|
||||||
.NumberOfInstallments,
|
.NumberOfInstallments,
|
||||||
value:
|
value:
|
||||||
product?.selectedItem?.sellers[0].commertialOffer.Installments[10].Value,
|
product?.selectedItem?.sellers[0].commertialOffer.Installments[3].Value,
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<p className={styles.PriceContent}>
|
<p className={styles.PriceContent}>
|
||||||
|
Loading…
Reference in New Issue
Block a user