summaryrefslogtreecommitdiff
path: root/src/lib/product/components
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-05-07 09:46:41 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-05-07 09:46:41 +0700
commitd48f8943b87178ccc653ae1d334b3780c5a23a31 (patch)
tree40fbd0184ae2b278f21a07039b0d152479cf9ff8 /src/lib/product/components
parent166191e8f7335810cd0073b9aa2436a908a21d34 (diff)
parent5c8a5df24a9758f3b3a6366d326f61c2c6a13c42 (diff)
Merge branch 'new-release' of https://bitbucket.org/altafixco/next-indoteknik into feat_voucher-category
Diffstat (limited to 'src/lib/product/components')
-rw-r--r--src/lib/product/components/ProductSearch.jsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index e2e1f859..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 });