From 455ebc5c02657a6c1c328977e08176e222c56ddd Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Mon, 5 Aug 2024 13:12:22 +0700
Subject: query filter

---
 src/lib/product/components/ProductSearch.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/lib/product/components/ProductSearch.jsx')

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index b1a5d409..fb9017f4 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -38,7 +38,7 @@ const ProductSearch = ({
   const [q, setQ] = useState(query?.q || '*');
   const [search, setSearch] = useState(query?.q || '*');
   const [limit, setLimit] = useState(query?.limit || 30);
-  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
+  const [orderBy, setOrderBy] = useState(router.query?.orderBy);
   if (defaultBrand) query.brand = defaultBrand.toLowerCase();
   const { productSearch } = useProductSearch({
     query: { ...query, q, limit, orderBy },
@@ -148,6 +148,7 @@ const ProductSearch = ({
   
 
   const orderOptions = [
+    { value: '', label: 'Pilih Filter' },
     { value: 'price-asc', label: 'Harga Terendah' },
     { value: 'price-desc', label: 'Harga Tertinggi' },
     { value: 'popular', label: 'Populer' },
-- 
cgit v1.2.3

