4
0
forked from crowetic/commerce
commerce/framework/shopify/utils/get-search-variables.ts
2021-02-04 13:23:44 +02:00

16 lines
286 B
TypeScript

export const searchByProductType = (search?: string) => {
return search
? {
query: `product_type:${search}`,
}
: {}
}
export const searchByTag = (categoryPath?: string) => {
return categoryPath
? {
query: `tag:${categoryPath}`,
}
: {}
}