summaryrefslogtreecommitdiff
path: root/src/lib/product/components/ProductSearch.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-30 14:47:28 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-30 14:47:28 +0700
commitc92b47f81b4ea90f799810555395af7afcfa5a4d (patch)
tree4aa2236ad1b78a06d5fd0361a738201a96358827 /src/lib/product/components/ProductSearch.jsx
parentd14f51d91cfb8851ae2c335628737d2f516dbf6a (diff)
<iman> update category management
Diffstat (limited to 'src/lib/product/components/ProductSearch.jsx')
-rw-r--r--src/lib/product/components/ProductSearch.jsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index d4c5a308..09534a5d 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -249,6 +249,7 @@ const ProductSearch = ({
brands.push({ brand, qty });
}
}
+
const categories = [];
for (
@@ -263,6 +264,7 @@ const ProductSearch = ({
categories.push({ name, qty });
}
}
+
const orderOptions = [
{ value: 'price-asc', label: 'Harga Terendah' },
@@ -340,7 +342,7 @@ const ProductSearch = ({
q: router.query.q,
orderBy: orderBy,
brand: brandValues.join(','),
- category: categoryValues.join(','),
+ category: categoryValues?.join(','),
priceFrom,
priceTo,
};