enable add and remove items (update) from cart. Update Search

This commit is contained in:
Greg Hoskin
2021-04-04 16:16:27 -06:00
parent 18936b7544
commit d0a04a8fe9
7 changed files with 41 additions and 50 deletions

View File

@@ -1,12 +1,12 @@
import useCart, { UseCart } from '@commerce/cart/use-cart'
import { Customer } from '@commerce/types'
import { Cart } from '@commerce/types'
import { SWRHook } from '@commerce/utils/types'
import { normalizeCart } from '../utils/normalize'
// import { getCustomerQuery, getCustomerToken } from '../utils'
export default useCart as UseCart<typeof handler>
export const handler: SWRHook<Customer | null> = {
export const handler: SWRHook<Cart | null> = {
fetchOptions: {
query: 'cart',
method: 'get',