feat: Adiciona pix
This commit is contained in:
parent
c9882ca401
commit
371a137ab4
4
react/Pix.ts
Normal file
4
react/Pix.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import Pix from "./components/Pix/Pix";
|
||||
|
||||
|
||||
export default Pix;
|
@ -1,3 +0,0 @@
|
||||
// import { Pix } from "./components/Pix/Pix";
|
||||
|
||||
// export default Pix;
|
@ -1,31 +1,26 @@
|
||||
// import React, { FC } from "react";
|
||||
// import { useProduct } from "vtex.product-context";
|
||||
// import pix from "./pix.svg";
|
||||
import React from "react";
|
||||
import { useProduct } from "vtex.product-context";
|
||||
|
||||
// const ProductValue = () => {
|
||||
// const productValue = useProduct();
|
||||
// export const PixProduct: FC = () => {
|
||||
// const productContextValue = useProduct();
|
||||
// const vavazinha =
|
||||
// productContextValue?.product?.priceRange?.sellingPrice?.highPrice;
|
||||
const Pix = () => {
|
||||
const productContextValue = useProduct()?.product?.priceRange?.sellingPrice
|
||||
?.highPrice;
|
||||
|
||||
// console.log('productValue', productValue);
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<img src="https://agenciamagma.vtexassets.com/arquivos/pix_izabela.svg" alt="Pix" />
|
||||
{`R$ ${(productContextValue! - productContextValue! * 0.1)
|
||||
.toFixed(2)
|
||||
.replace(".", ",")}`
|
||||
}
|
||||
<p>
|
||||
10% de desconto
|
||||
</p>
|
||||
</div>
|
||||
|
||||
// // return <>oi</>;
|
||||
// return (
|
||||
// <>
|
||||
// <div>
|
||||
// <img src={pix} alt="Pix" />
|
||||
// {`R$ ${(vavazinha! - vavazinha! * 0.1)
|
||||
// .toFixed(2)
|
||||
// .replace(".", ",")}`
|
||||
// }
|
||||
// <span>
|
||||
// 10% de desconto
|
||||
// </span>
|
||||
// </div>
|
||||
// </>
|
||||
// );
|
||||
// };
|
||||
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
// export default ProductValue;
|
||||
export default Pix;
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@ -91,7 +91,8 @@
|
||||
"desktop": "auto",
|
||||
"phone": "16:9"
|
||||
},
|
||||
"displayThumbnailsArrows": true
|
||||
"thumbnailsOrientation": "horizontal",
|
||||
"displayThumbnailsArrows": false
|
||||
}
|
||||
},
|
||||
"flex-layout.col#right-col": {
|
||||
@ -103,7 +104,7 @@
|
||||
"flex-layout.row#product-name",
|
||||
"product-identifier.product",
|
||||
"product-rating-summary",
|
||||
// "use-product",
|
||||
"Pix",
|
||||
"flex-layout.row#list-price-savings",
|
||||
"flex-layout.row#selling-price",
|
||||
"product-installments",
|
||||
|
@ -5,5 +5,9 @@
|
||||
"html": {
|
||||
"component": "html",
|
||||
"composition": "children"
|
||||
},
|
||||
|
||||
"Pix": {
|
||||
"component": "Pix"
|
||||
}
|
||||
}
|
||||
|
@ -103,8 +103,6 @@
|
||||
.shippingTable {
|
||||
.shippingTableRadioBtn {
|
||||
display: none;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.shippingTableHead {
|
||||
|
Loading…
Reference in New Issue
Block a user