mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Update Swell Provider (#359)
* fix update cart item * update types * update checkout * update get-page, cleanup types * revert change to incorrect file * cleanup Co-authored-by: Greg Hoskin <greghoskin@Gregs-MacBook-Pro.local>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { Provider } from '@commerce'
|
||||
|
||||
import { SWELL_CHECKOUT_URL_COOKIE, STORE_DOMAIN } from './const'
|
||||
|
||||
import { handler as useCart } from './cart/use-cart'
|
||||
@@ -14,18 +16,15 @@ import { handler as useSignup } from './auth/use-signup'
|
||||
|
||||
import fetcher from './fetcher'
|
||||
|
||||
export const swellProvider = {
|
||||
export const swellProvider: Provider = {
|
||||
locale: 'en-us',
|
||||
cartCookie: SWELL_CHECKOUT_URL_COOKIE,
|
||||
storeDomain: STORE_DOMAIN,
|
||||
// storeDomain: STORE_DOMAIN,
|
||||
fetcher,
|
||||
cart: { useCart, useAddItem, useUpdateItem, useRemoveItem },
|
||||
customer: { useCustomer },
|
||||
products: { useSearch },
|
||||
auth: { useLogin, useLogout, useSignup },
|
||||
features: {
|
||||
wishlist: false,
|
||||
},
|
||||
}
|
||||
|
||||
export type SwellProvider = typeof swellProvider
|
||||
|
Reference in New Issue
Block a user