challenge-vtex-io-wellingto.../react/components/PixComponent/PixComponent.tsx

21 lines
501 B
TypeScript
Raw Normal View History

2023-02-11 00:52:47 +00:00
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;