4
0
forked from crowetic/commerce

Merge branch 'master' into arzafran/responsive-bottom-grid

This commit is contained in:
Franco Arza 2020-10-26 19:32:19 -03:00
commit 90eaae14d5
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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 }
}