summaryrefslogtreecommitdiff
path: root/src/lib/product/components/ProductSearch.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-05-27 10:32:45 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-05-27 10:32:45 +0700
commit62d2edfa5ae62cd8faa2d0322ddfd5dfa6ad2d2e (patch)
treed6cceab24bd7f7c4dbfc4c0ff3ef3c932e0d9b14 /src/lib/product/components/ProductSearch.jsx
parent6499f025995f13fcf32b2b5f79c8ee14585668fc (diff)
parentfd867a90e22fb2fc2fb16237165796ebe0cabab0 (diff)
<hafid> merge repeat order & new-release
Diffstat (limited to 'src/lib/product/components/ProductSearch.jsx')
-rw-r--r--src/lib/product/components/ProductSearch.jsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index f7b044aa..eb86485d 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -84,10 +84,7 @@ const ProductSearch = ({
if (router.asPath.includes('penawaran')) {
query = {
...query,
- fq: [
- `-flashsale_id_i:${router.query.penawaran}`,
- `flashsale_price_f:[1 TO *]`,
- ],
+ fq:`flashsale_id_i:${router.query.penawaran} AND flashsale_price_f:[1 TO *]`,
orderBy: 'flashsale-discount-desc',
};
setFinalQuery(query);
@@ -152,7 +149,7 @@ const ProductSearch = ({
}, [dataCategoriesProduct, dataLob]);
useEffect(() => {
- if (prefixUrl.includes('category') || prefixUrl.includes('lob')) {
+ if (prefixUrl.includes('category') || prefixUrl.includes('lob') || router.asPath.includes('penawaran')) {
setQueryFinal({ ...finalQuery, q, limit, orderBy });
} else {
setQueryFinal({ ...query, q, limit, orderBy });
@@ -549,7 +546,7 @@ const ProductSearch = ({
<div className='h-6' />
- <SideBanner />
+ <SideBanner query={search} />
</div>
<div className='w-9/12 pl-6'>