update product search hook. whitelist cdn

This commit is contained in:
Greg Hoskin
2021-03-29 17:49:14 -06:00
parent e4c1050880
commit 1ebf458fb2
8 changed files with 31 additions and 56 deletions

View File

@@ -12,13 +12,9 @@ export const handler: SWRHook<Customer | null> = {
method: 'get',
},
async fetcher({ options, fetch }) {
// console.log('STORE_ID', STORE_ID, 'PUBLIC_KEY', PUBLIC_KEY);
// const data = await swell.account.get()
const data = await fetch<any | null>({
...options,
// variables: { customerAccessToken: getCustomerToken() },
})
console.log(`Customer data ${data}`)
return data ? normalizeCustomer(data) : null
},
useHook: ({ useData }) => (input) => {