Added initial version of useAddItem

This commit is contained in:
cond0r
2021-02-18 15:04:46 +02:00
parent 7f0c1eb66c
commit 89cc3d0608
8 changed files with 65 additions and 75 deletions

View File

@@ -1,8 +1,9 @@
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 { handler as useCart } from './cart/use-cart'
import { handler as useAddItem } from './cart/use-add-item'
import { handler as useSearch } from './product/use-search'
import { handler as useCustomer } from './customer/use-customer'
import fetcher from './fetcher'
export const shopifyProvider = {
@@ -10,7 +11,7 @@ export const shopifyProvider = {
cartCookie: SHOPIFY_CHECKOUT_ID_COOKIE,
storeDomain: STORE_DOMAIN,
fetcher,
cart: { useCart },
cart: { useCart, useAddItem },
customer: { useCustomer },
products: { useSearch },
}