mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
enable add and remove items (update) from cart. Update Search
This commit is contained in:
@@ -28,12 +28,11 @@ export const handler: SWRHook<
|
||||
query: getAllProductsQuery,
|
||||
},
|
||||
async fetcher({ input, options, fetch }) {
|
||||
const { categoryId, brandId } = input
|
||||
|
||||
const { categoryId, search } = input
|
||||
const { results, count: found } = await fetch({
|
||||
query: 'products',
|
||||
method: 'list',
|
||||
variables: { category: categoryId },
|
||||
variables: { category: categoryId, search },
|
||||
})
|
||||
|
||||
const products = results.map((product) => normalizeProduct(product))
|
||||
|
Reference in New Issue
Block a user