4
0
forked from crowetic/commerce

Export the extend fn

This commit is contained in:
Luis Alvarez
2020-10-09 13:24:13 -05:00
parent 22ba0d7315
commit d67c728e80
4 changed files with 12 additions and 12 deletions

View File

@@ -25,7 +25,7 @@ export const fetcher: HookFetcher<Cart | null, RemoveItemBody> = (
})
}
function extend(customFetcher: typeof fetcher) {
export function extendHook(customFetcher: typeof fetcher) {
const useRemoveItem = (item?: any) => {
const { mutate } = useCart()
const fn = useCartRemoveItem<Cart | null, RemoveItemBody>(
@@ -43,9 +43,9 @@ function extend(customFetcher: typeof fetcher) {
)
}
useRemoveItem.extend = extend
useRemoveItem.extend = extendHook
return useRemoveItem
}
export default extend(fetcher)
export default extendHook(fetcher)