mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26: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,13 +1,13 @@
|
||||
import useCart, { UseCart } from '@commerce/cart/use-cart'
|
||||
import { Cart } from '@commerce/types'
|
||||
import { SWRHook } from '@commerce/utils/types'
|
||||
import { useMemo } from 'react'
|
||||
import { normalizeCart } from '../utils/normalize'
|
||||
import { checkoutCreate, checkoutToCart } from './utils'
|
||||
import type { GetCartHook } from '@commerce/types/cart'
|
||||
|
||||
export default useCart as UseCart<typeof handler>
|
||||
|
||||
export const handler: SWRHook<Cart | null, {}, any, { isEmpty?: boolean }> = {
|
||||
export const handler: SWRHook<GetCartHook> = {
|
||||
fetchOptions: {
|
||||
query: 'cart',
|
||||
method: 'get',
|
||||
|
Reference in New Issue
Block a user