mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Moved handler to each hook
This commit is contained in:
18
framework/shopify/provider.ts
Normal file
18
framework/shopify/provider.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { SHOPIFY_CHECKOUT_ID_COOKIE, STORE_DOMAIN } from './const'
|
||||
|
||||
import { handler as useCart } from '@framework/cart/use-cart'
|
||||
import { handler as useSearch } from '@framework/product/use-search'
|
||||
import { handler as useCustomer } from '@framework/customer/use-customer'
|
||||
import fetcher from './fetcher'
|
||||
|
||||
export const shopifyProvider = {
|
||||
locale: 'en-us',
|
||||
cartCookie: SHOPIFY_CHECKOUT_ID_COOKIE,
|
||||
storeDomain: STORE_DOMAIN,
|
||||
fetcher,
|
||||
cart: { useCart },
|
||||
customer: { useCustomer },
|
||||
products: { useSearch },
|
||||
}
|
||||
|
||||
export type ShopifyProvider = typeof shopifyProvider
|
Reference in New Issue
Block a user