forked from M3-Academy/challenge-vtex-io
refactor: removendo arquivos do componente InstallmentProduct
This commit is contained in:
parent
9459e48d97
commit
348a4a0981
@ -1,3 +0,0 @@
|
||||
import InstallmentProduct from "./components/InstallmentProduct/InstallmentProduct";
|
||||
|
||||
export default InstallmentProduct;
|
@ -1,27 +0,0 @@
|
||||
import React from "react";
|
||||
import { useProduct } from "vtex.product-context";
|
||||
import styles from "./styles.css";
|
||||
|
||||
const InstallmentProduct = () => {
|
||||
const product = useProduct();
|
||||
const productWithInstallments = {
|
||||
numberOfInstallments:
|
||||
product?.selectedItem?.sellers[0].commertialOffer.Installments[3]
|
||||
.NumberOfInstallments,
|
||||
value:
|
||||
product?.selectedItem?.sellers[0].commertialOffer.Installments[3].Value,
|
||||
};
|
||||
return (
|
||||
<p className={styles.PriceContent}>
|
||||
<span style={{fontWeight: "700"}}>{productWithInstallments.numberOfInstallments}x </span>
|
||||
de
|
||||
<span style={{fontWeight: "700"}}>
|
||||
R$
|
||||
{productWithInstallments.value?.toFixed(2).toString().replace(".", ",")}
|
||||
</span>{" "}
|
||||
sem juros
|
||||
</p>
|
||||
);
|
||||
};
|
||||
|
||||
export default InstallmentProduct;
|
@ -1,7 +0,0 @@
|
||||
.PriceContent {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
color: #929292;
|
||||
}
|
Loading…
Reference in New Issue
Block a user