From 027c4aca7034db8ba82cc874136e98e18c241330 Mon Sep 17 00:00:00 2001 From: mohammadou1 <47993969+mohammadou1@users.noreply.github.com> Date: Fri, 22 Jan 2021 19:59:25 +0300 Subject: [PATCH] @hotfix/fixing brand id in use-search (#174) to set searchParam brand, should check brandId and not categoryId Co-authored-by: mohux --- framework/bigcommerce/products/use-search.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/bigcommerce/products/use-search.tsx b/framework/bigcommerce/products/use-search.tsx index ade0bbca2..2b4ee7593 100644 --- a/framework/bigcommerce/products/use-search.tsx +++ b/framework/bigcommerce/products/use-search.tsx @@ -26,8 +26,7 @@ export const fetcher: HookFetcher = ( if (search) url.searchParams.set('search', search) if (Number.isInteger(categoryId)) url.searchParams.set('category', String(categoryId)) - if (Number.isInteger(categoryId)) - url.searchParams.set('brand', String(brandId)) + if (Number.isInteger(brandId)) url.searchParams.set('brand', String(brandId)) if (sort) url.searchParams.set('sort', sort) return fetch({