forked from M3-Academy/challenge-vtex-io
21 lines
501 B
TypeScript
21 lines
501 B
TypeScript
import React from "react";
|
|
import { useProduct } from "vtex.product-context";
|
|
import "./PixComponent.css";
|
|
|
|
const pixComponent = () => {
|
|
const product = useProduct();
|
|
|
|
return (
|
|
<div className="wrapperPix">
|
|
<div className="wrapperPrices">
|
|
<p className="wrapperTitle">
|
|
{(product?.product?.priceRange.sellingPrice.highPrice || 0) * 0.9}
|
|
</p>
|
|
<p className="wrapperSubtitle">10 % de desconto</p>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default pixComponent;
|