2023-01-24 14:33:36 +00:00
|
|
|
import React, { FC } from 'react'
|
|
|
|
import { useProduct } from 'vtex.product-context'
|
|
|
|
import styles from "./styles.css";
|
|
|
|
|
|
|
|
export const DescriptionSection: FC = () => {
|
|
|
|
|
|
|
|
const productContextValue = useProduct();
|
|
|
|
|
|
|
|
const imageProduct = productContextValue?.product?.items[0].images[0].imageUrl;
|
|
|
|
const imageProductAlt = productContextValue?.product?.productName;
|
|
|
|
const descriptionProduct = productContextValue?.product?.description;
|
|
|
|
|
2023-01-25 00:23:44 +00:00
|
|
|
return (
|
2023-01-24 14:33:36 +00:00
|
|
|
<div className={styles.wrapperImageAndDescription}>
|
2023-01-25 02:11:24 +00:00
|
|
|
<div className={styles.containerImageProductDescriptionSection}>
|
|
|
|
<img className={styles.imageProductDescriptionSection} src={imageProduct} alt={imageProductAlt} />
|
|
|
|
</div>
|
2023-01-24 14:33:36 +00:00
|
|
|
<div className={styles.wrapperDescriptionSection}>
|
|
|
|
<h3 className={styles.descriptionSectionTitle}>Descrição do produto</h3>
|
|
|
|
<p className={styles.descriptionSectionParagraph}>{descriptionProduct}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|