mirror of
https://github.com/vercel/commerce.git
synced 2025-03-14 22:42:33 +00:00
Removed use-cart-actions
This commit is contained in:
parent
74da22d5f4
commit
ff5b1e9414
@ -1,5 +1,4 @@
|
||||
export { default as useCart } from './use-cart'
|
||||
export { default as useAddItem } from './use-add-item'
|
||||
export { default as useRemoveItem } from './use-remove-item'
|
||||
export { default as useWishlistActions } from './use-cart-actions'
|
||||
export { default as useUpdateItem } from './use-cart-actions'
|
||||
export { default as useUpdateItem } from './use-update-item'
|
||||
|
@ -1,13 +0,0 @@
|
||||
import useAddItem from './use-add-item'
|
||||
import useRemoveItem from './use-remove-item'
|
||||
import useUpdateItem from './use-update-item'
|
||||
|
||||
// This hook is probably not going to be used, but it's here
|
||||
// to show how a commerce should be structuring it
|
||||
export default function useCartActions() {
|
||||
const addItem = useAddItem()
|
||||
const updateItem = useUpdateItem()
|
||||
const removeItem = useRemoveItem()
|
||||
|
||||
return { addItem, updateItem, removeItem }
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
import type { HookFetcher, HookFetcherOptions } from '../utils/types'
|
||||
// import useAddItem from './use-add-item'
|
||||
import useRemoveItem from './use-remove-item'
|
||||
import useUpdateItem from './use-update-item'
|
||||
|
||||
// This hook is probably not going to be used, but it's here
|
||||
// to show how a commerce should be structuring it
|
||||
export default function useCartActions<T, Input>(
|
||||
options: HookFetcherOptions,
|
||||
fetcher: HookFetcher<T, Input>
|
||||
) {
|
||||
// const addItem = useAddItem<T, Input>(options, fetcher)
|
||||
const updateItem = useUpdateItem<T, Input>(options, fetcher)
|
||||
const removeItem = useRemoveItem<T, Input>(options, fetcher)
|
||||
|
||||
return { updateItem, removeItem }
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user