forked from crowetic/commerce
Merge branch 'master' into arzafran/responsive-bottom-grid
This commit is contained in:
commit
90eaae14d5
@ -27,7 +27,7 @@ export const fetcher: HookFetcher<Wishlist | null, RemoveItemBody> = (
|
||||
|
||||
export function extendHook(customFetcher: typeof fetcher) {
|
||||
const useRemoveItem = (wishlistId: string, item?: any) => {
|
||||
const { mutate } = useWishlist(wishlistId)
|
||||
const { mutate } = useWishlist()
|
||||
const fn = useAction<Wishlist | null, RemoveItemBody>(
|
||||
defaultOpts,
|
||||
customFetcher
|
||||
|
@ -3,9 +3,9 @@ import useRemoveItem from './use-remove-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 useWishlistActions(wishlistId: string) {
|
||||
const addItem = useAddItem(wishlistId)
|
||||
const removeItem = useRemoveItem(wishlistId)
|
||||
export default function useWishlistActions() {
|
||||
const addItem = useAddItem()
|
||||
const removeItem = useRemoveItem('')
|
||||
|
||||
return { addItem, removeItem }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user