mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
changed list products so it does not rely on unreleased version of medusa-js
This commit is contained in:
@@ -10,16 +10,17 @@ export const handler: SWRHook<any> = {
|
||||
method: 'list',
|
||||
},
|
||||
async fetcher({ input, options, fetch }) {
|
||||
const { products } = await fetch({
|
||||
...options,
|
||||
variables: { query: null },
|
||||
})
|
||||
// NOOP
|
||||
// const results = await fetch({
|
||||
// ...options,
|
||||
// variables: { query: null },
|
||||
// })
|
||||
|
||||
// console.warn(results)
|
||||
|
||||
return {
|
||||
products: products
|
||||
? products.map((product: MedusaProduct) => normalizeProduct(product))
|
||||
: [],
|
||||
found: products.length,
|
||||
products: [],
|
||||
found: 0,
|
||||
}
|
||||
},
|
||||
useHook:
|
||||
|
Reference in New Issue
Block a user