summaryrefslogtreecommitdiff
path: root/src/lib/product/components/Product/ProductDesktopVariant.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-11 15:26:55 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-11 15:26:55 +0700
commitc1ef10e3655904f4fe5b085460a89dc5c5a774cb (patch)
tree11b17b71714966c54e0ae7efb06136d77e6e05a7 /src/lib/product/components/Product/ProductDesktopVariant.jsx
parent2e1c0fb77932bdd0681f8d7c9cfd292a9ac52b3b (diff)
parentbf668785232e2d7abba1660dfdb6eb2746adc09a (diff)
Merge branch 'new-release' into CR/new_product_detail
# Conflicts: # src/lib/product/components/Product/ProductDesktopVariant.jsx
Diffstat (limited to 'src/lib/product/components/Product/ProductDesktopVariant.jsx')
-rw-r--r--src/lib/product/components/Product/ProductDesktopVariant.jsx19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/product/components/Product/ProductDesktopVariant.jsx b/src/lib/product/components/Product/ProductDesktopVariant.jsx
index c181676c..e7a1fa4e 100644
--- a/src/lib/product/components/Product/ProductDesktopVariant.jsx
+++ b/src/lib/product/components/Product/ProductDesktopVariant.jsx
@@ -4,8 +4,9 @@ import { Info, MessageCircleIcon, Share2Icon } from 'lucide-react';
import { useRouter } from 'next/router';
import { useCallback, useEffect, useRef, useState } from 'react';
import { toast } from 'react-hot-toast';
+import AddToWishlist from '../../../../../src-migrate/modules/product-detail/components/AddToWishlist';
+import { RWebShare } from 'react-web-share';
import LazyLoad from 'react-lazy-load';
-
import { useProductCartContext } from '@/contexts/ProductCartContext';
import odooApi from '@/core/api/odooApi';
import Image from '@/core/components/elements/Image/Image';
@@ -20,11 +21,11 @@ import whatsappUrl from '@/core/utils/whatsappUrl';
import { getAuth } from '~/libs/auth';
import ImageNext from 'next/image';
-import { RWebShare } from 'react-web-share';
import productSimilarApi from '../../api/productSimilarApi';
import ProductCard from '../ProductCard';
import ProductSimilar from '../ProductSimilar';
import ProductPromoSection from '~/modules/product-promo/components/Section';
+import SimilarBottom from '~/modules/product-detail/components/SimilarBottom';
const SELF_HOST = process.env.NEXT_PUBLIC_SELF_HOST;
@@ -38,6 +39,7 @@ const ProductDesktopVariant = ({
let auth = useAuth();
const { slug } = router.query;
const { srsltid } = router.query;
+ const [askAdminUrl, setAskAdminUrl, isApproval] = useState();
const [lowestPrice, setLowestPrice] = useState(null);
const [addCartAlert, setAddCartAlert] = useState(false);
@@ -229,6 +231,7 @@ const ProductDesktopVariant = ({
};
fetchData();
}, [product]);
+ console.log('product', product);
return (
<DesktopView>
@@ -533,7 +536,7 @@ const ProductDesktopVariant = ({
<div className='font-medium text-center p-4 bg-gray_r-1 border-b border-gray_r-6 sticky top-0 z-10'>
Produk Serupa
</div>
- <div className='h-full divide-y divide-gray_r-6 max-h-96'>
+ <div className='h-full divide-y divide-gray_r-6 max-h-[500px]'>
{productSimilarInBrand &&
productSimilarInBrand?.map((product) => (
<div className='py-2' key={product.id}>
@@ -550,8 +553,11 @@ const ProductDesktopVariant = ({
Kamu Mungkin Juga Suka
</div>
<LazyLoad>
- <ProductSimilar query={productSimilarQuery} />
+ <SimilarBottom product={product} />
</LazyLoad>
+ {/* <LazyLoad>
+ <ProductSimilar query={productSimilarQuery} />
+ </LazyLoad> */}
</div>
<BottomPopup
@@ -586,8 +592,11 @@ const ProductDesktopVariant = ({
Kamu Mungkin Juga Suka
</div>
<LazyLoad>
- <ProductSimilar query={productSimilarQuery} />
+ <SimilarBottom product={product} />
</LazyLoad>
+ {/* <LazyLoad>
+ <ProductSimilar query={productSimilarQuery} />
+ </LazyLoad> */}
</div>
</BottomPopup>
</div>