enable add and remove items (update) from cart. Update Search

This commit is contained in:
Greg Hoskin
2021-04-04 16:16:27 -06:00
parent 18936b7544
commit d0a04a8fe9
7 changed files with 41 additions and 50 deletions

View File

@@ -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))