update get product hook

This commit is contained in:
Greg Hoskin
2021-04-01 16:32:12 -06:00
parent 1ebf458fb2
commit 18936b7544
8 changed files with 103 additions and 131 deletions

View File

@@ -8,9 +8,11 @@ const fetcher: Fetcher = async ({ method = 'get', variables, query }) => {
if (Array.isArray(variables)) {
const arg1 = variables[0]
const arg2 = variables[1]
// console.log('fetcher', query, method, variables);
const response = await swell[query][method](arg1, arg2)
return handleFetchResponse(response)
} else {
// console.log('fetcher', query, method, variables);
const response = await swell[query][method](variables)
return handleFetchResponse(response)
}