Moved handler to each hook

This commit is contained in:
cond0r
2021-02-16 10:15:18 +02:00
parent 44081dddb6
commit f698dea698
17 changed files with 195 additions and 170 deletions

View 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