fixed some bugs
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
import ImageCarousel from "../../components/ProductCard/imageCarousel/index";
|
||||
import Loader from "../../components/Loader/index";
|
||||
import { Result, Button } from "antd";
|
||||
import { div } from "framer-motion/client";
|
||||
|
||||
const ProductPage = ({
|
||||
productProp,
|
||||
@@ -351,10 +352,14 @@ const ProductPage = ({
|
||||
)} */}
|
||||
|
||||
{product.brand?.name && (
|
||||
<div className={styles.metaItem}>
|
||||
<a
|
||||
href={`/brands/${product.brand.id}`}
|
||||
target="_blank"
|
||||
className={styles.metaItem}
|
||||
>
|
||||
<span className={styles.metaLabel}>{t("order.brand")}</span>
|
||||
<span className={styles.metaValue}>{product.brand.name}</span>
|
||||
</div>
|
||||
</a>
|
||||
)}
|
||||
|
||||
{product.channel?.[0]?.name && (
|
||||
@@ -385,29 +390,31 @@ const ProductPage = ({
|
||||
{t("product.description")}
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
ref={descRef}
|
||||
className={`${styles.productDescription} ${
|
||||
!isDescExpanded ? styles.productDescriptionCollapsed : ""
|
||||
}`}
|
||||
dangerouslySetInnerHTML={{ __html: product.description }}
|
||||
/>
|
||||
{showReadMore && !isDescExpanded && (
|
||||
<button
|
||||
className={styles.readMoreBtn}
|
||||
onClick={() => setIsDescExpanded(true)}
|
||||
>
|
||||
{t("product.readMore")}
|
||||
</button>
|
||||
)}
|
||||
{showReadMore && isDescExpanded && (
|
||||
<button
|
||||
className={styles.readMoreBtn}
|
||||
onClick={() => setIsDescExpanded(false)}
|
||||
>
|
||||
{t("product.readLess")}
|
||||
</button>
|
||||
)}
|
||||
<div className={styles.productDescriptionWrapper}>
|
||||
<div
|
||||
ref={descRef}
|
||||
className={`${styles.productDescription} ${
|
||||
!isDescExpanded ? styles.productDescriptionCollapsed : ""
|
||||
}`}
|
||||
dangerouslySetInnerHTML={{ __html: product.description }}
|
||||
/>
|
||||
{showReadMore && !isDescExpanded && (
|
||||
<button
|
||||
className={styles.readMoreBtn}
|
||||
onClick={() => setIsDescExpanded(true)}
|
||||
>
|
||||
{t("product.readMore")}
|
||||
</button>
|
||||
)}
|
||||
{showReadMore && isDescExpanded && (
|
||||
<button
|
||||
className={styles.readMoreBtn}
|
||||
onClick={() => setIsDescExpanded(false)}
|
||||
>
|
||||
{t("product.readLess")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user