added baha anyklmak, attributes
This commit is contained in:
@@ -27,6 +27,9 @@ import ImageCarousel from "../../components/ProductCard/imageCarousel/index";
|
||||
import Loader from "../../components/Loader/index";
|
||||
import { Result, Button } from "antd";
|
||||
import { div } from "framer-motion/client";
|
||||
import PendingPriceBadge from "../../components/PendingPriceBadge";
|
||||
|
||||
const isPriceZero = (price) => !price || parseFloat(price) === 0;
|
||||
|
||||
const ProductPage = ({
|
||||
productProp,
|
||||
@@ -370,6 +373,15 @@ const ProductPage = ({
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{product.properties?.length > 0 && (
|
||||
product.properties.map((prop, index) => (
|
||||
<div key={`${prop.attribute_id}-${index}`} className={styles.metaItem}>
|
||||
<span className={styles.metaLabel}>{prop.name}</span>
|
||||
<span className={styles.metaValue}>{prop.value}</span>
|
||||
</div>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Description card */}
|
||||
@@ -426,11 +438,19 @@ const ProductPage = ({
|
||||
<div className={styles.priceRow}>
|
||||
<span className={styles.priceLabel}>{t("product.price")}:</span>
|
||||
<div className={styles.priceRight}>
|
||||
<span className={styles.price}>{product.price_amount} m.</span>
|
||||
{product.old_price_amount && (
|
||||
<span className={styles.oldPrice}>
|
||||
{product.old_price_amount} m.
|
||||
{isPriceZero(product.price_amount) ? (
|
||||
<span style={{ display: "inline-flex", alignItems: "center", gap: 6, fontWeight: 600 }}>
|
||||
{t("cart.pendingPriceTitle")} <PendingPriceBadge />
|
||||
</span>
|
||||
) : (
|
||||
<>
|
||||
<span className={styles.price}>{product.price_amount} m.</span>
|
||||
{product.old_price_amount && (
|
||||
<span className={styles.oldPrice}>
|
||||
{product.old_price_amount} m.
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -444,11 +464,19 @@ const ProductPage = ({
|
||||
{/* ── Mobile sticky bar ── */}
|
||||
<div className={styles.productActionsMobile}>
|
||||
<div className={styles.mobilePriceContainer}>
|
||||
<span className={styles.price}>{product.price_amount} m.</span>
|
||||
{product.old_price_amount && (
|
||||
<span className={styles.oldPrice}>
|
||||
{product.old_price_amount} m.
|
||||
{isPriceZero(product.price_amount) ? (
|
||||
<span style={{ display: "inline-flex", alignItems: "center", gap: 6, fontWeight: 600 }}>
|
||||
{t("cart.pendingPriceTitle")} <PendingPriceBadge />
|
||||
</span>
|
||||
) : (
|
||||
<>
|
||||
<span className={styles.price}>{product.price_amount} m.</span>
|
||||
{product.old_price_amount && (
|
||||
<span className={styles.oldPrice}>
|
||||
{product.old_price_amount} m.
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.mobileBtnContainer}>
|
||||
|
||||
Reference in New Issue
Block a user