summaryrefslogtreecommitdiff
path: root/src-migrate/modules
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-08 17:09:56 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-08 17:09:56 +0700
commit616d8ffc973eba673069243ec8981b5234234fe5 (patch)
treebd3aac41921bbad8959e0c4b6b083aabd7d097e3 /src-migrate/modules
parentbd62835db7dc521a17d6b0aea81badaae6ade95c (diff)
<iman> add similar product template
Diffstat (limited to 'src-migrate/modules')
-rw-r--r--src-migrate/modules/product-detail/components/ProductDetail.tsx2
-rw-r--r--src-migrate/modules/product-detail/components/SimilarBottom.tsx6
2 files changed, 5 insertions, 3 deletions
diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx
index fad35a7d..f5feae76 100644
--- a/src-migrate/modules/product-detail/components/ProductDetail.tsx
+++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx
@@ -178,7 +178,7 @@ const ProductDetail = ({ product }: Props) => {
<div className='h-6' />
<LazyLoadComponent>
- <SimilarBottom product={product} />
+ <SimilarBottom product={product} source={'bottom'}/>
</LazyLoadComponent>
</div>
diff --git a/src-migrate/modules/product-detail/components/SimilarBottom.tsx b/src-migrate/modules/product-detail/components/SimilarBottom.tsx
index 40d4dd82..ab33f106 100644
--- a/src-migrate/modules/product-detail/components/SimilarBottom.tsx
+++ b/src-migrate/modules/product-detail/components/SimilarBottom.tsx
@@ -5,12 +5,14 @@ import { IProductDetail } from '~/types/product'
type Props = {
product: IProductDetail
+ source: string
}
-const SimilarBottom = ({ product }: Props) => {
+const SimilarBottom = ({ product, source }: Props) => {
const productSimilar = useProductSimilar({
name: product.name,
- except: { productId: product.id }
+ except: { productId: product.id },
+ source: source
})
const products = productSimilar.data?.products || []