summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-08 10:10:56 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-08-08 10:10:56 +0000
commitc9090a89b775a1e3c2f1e707021e6375eb9f92e3 (patch)
tree85bb4be978ff65714e395a2a58772e098e67fd3f /src-migrate/modules/product-detail/components
parentfecff2431477d08d166c34f116972aa090cf463f (diff)
parent616d8ffc973eba673069243ec8981b5234234fe5 (diff)
Merged in Feature/template-switch (pull request #227)
Feature/template switch
Diffstat (limited to 'src-migrate/modules/product-detail/components')
-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 e4555913..6bd025af 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 || []