fixed some bugs

This commit is contained in:
@jcarymuhammedow
2026-04-17 18:38:16 +05:00
parent 68382648a8
commit 6ef7aa3c47
15 changed files with 171 additions and 39 deletions

View File

@@ -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>