forked from crowetic/commerce
@hotfix/fixing brand id in use-search (#174)
to set searchParam brand, should check brandId and not categoryId Co-authored-by: mohux <m.alolabi@uxbert.com>
This commit is contained in:
parent
742ac5786e
commit
027c4aca70
@ -26,8 +26,7 @@ export const fetcher: HookFetcher<SearchProductsData, SearchProductsInput> = (
|
||||
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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user