challenge-vtex-io-wellingto.../react/components/PixComponent/PixComponent.tsx
2023-02-10 21:52:47 -03:00

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;