mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
update product search hook. whitelist cdn
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user