summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-06-18 08:32:37 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-06-18 08:32:37 +0700
commite786215b1be4b88e1b43efb2beae15073d6f81db (patch)
treef873435c55562e15a305cf36aaf12cb744a39d89 /src/pages
parent55f4e2dc6e25dd425ad0a2b8763f8b8de0305e70 (diff)
<iman> update promotion program (handleSubmitFilter)
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/shop/promo/[slug].tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/shop/promo/[slug].tsx b/src/pages/shop/promo/[slug].tsx
index 1248ba35..da720b16 100644
--- a/src/pages/shop/promo/[slug].tsx
+++ b/src/pages/shop/promo/[slug].tsx
@@ -41,7 +41,6 @@ export default function PromoDetail() {
const [brandValues, setBrandValues] = useState<string[]>([]);
const [categoryValues, setCategoryValues] = useState<string[]>([]);
const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
- const [spellings, setSpellings] = useState(null);
const popup = useActive();
useEffect(() => {
@@ -243,7 +242,7 @@ export default function PromoDetail() {
const handleDeleteFilter = async (source, value) => {
let params = {
q: router.query.q,
- orderBy: orderBy,
+ orderBy: '',
brand: brandValues.join(','),
category: categoryValues.join(','),
priceFrom: priceFrom || '',
@@ -270,7 +269,7 @@ export default function PromoDetail() {
case 'delete':
params = {
q: router.query.q,
- orderBy: orderBy,
+ orderBy: '',
brand: '',
category: '',
priceFrom: '',
@@ -353,6 +352,7 @@ export default function PromoDetail() {
brands={brands || []}
categories={categories || []}
prefixUrl={router.asPath.includes('?') ? `${router.asPath}` : `${router.asPath}?`}
+ // prefixUrl={`${router.query}?`}
defaultBrand={null}
/>
</div>