added new ui for mobile phones
This commit is contained in:
@@ -56,7 +56,7 @@ const ProductPage = ({
|
||||
const { data: favoriteProducts = [] } = useGetFavoritesQuery();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [localIsFavorite, setLocalIsFavorite] = useState(
|
||||
favoriteProducts.some((fav) => fav.product?.id === product?.id),
|
||||
favoriteProducts.some((fav) => fav.product?.id === product?.id)
|
||||
);
|
||||
|
||||
const { getCartItem } = useCart();
|
||||
@@ -73,7 +73,7 @@ const ProductPage = ({
|
||||
useEffect(() => {
|
||||
const qty = parseInt(
|
||||
cartItem?.quantity || cartItem?.product_quantity || 0,
|
||||
10,
|
||||
10
|
||||
);
|
||||
setLocalQuantity(qty);
|
||||
setPendingQuantity(qty);
|
||||
@@ -83,7 +83,7 @@ const ProductPage = ({
|
||||
useEffect(() => {
|
||||
if (Array.isArray(favoriteProducts)) {
|
||||
const isFav = favoriteProducts.some(
|
||||
(fav) => fav.product?.id === product?.id,
|
||||
(fav) => fav.product?.id === product?.id
|
||||
);
|
||||
setLocalIsFavorite(isFav);
|
||||
}
|
||||
@@ -180,7 +180,7 @@ const ProductPage = ({
|
||||
useEffect(() => {
|
||||
const serverQty = parseInt(
|
||||
cartItem?.quantity || cartItem?.product_quantity || 0,
|
||||
10,
|
||||
10
|
||||
);
|
||||
|
||||
// Sadece miktar değiştiyse ve 0'dan büyükse güncelle (0 ise Remove triggerlanır)
|
||||
@@ -278,6 +278,15 @@ const ProductPage = ({
|
||||
<span className={styles.metaValue}>{product.brand.name}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{product.channel?.[0]?.name && (
|
||||
<div className={styles.metaItem}>
|
||||
<span className={styles.metaLabel}>{t("order.channel")}</span>
|
||||
<span className={styles.metaValue}>
|
||||
{product.channel[0].name}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.productActions}>
|
||||
<div className={styles.priceContainer}>
|
||||
|
||||
Reference in New Issue
Block a user