From 4b4d804d03648cee4cb023f85cb5078afff89286 Mon Sep 17 00:00:00 2001 From: Luis Alvarez Date: Fri, 19 Feb 2021 21:55:18 -0500 Subject: [PATCH] Removed use-action helper --- framework/commerce/utils/use-action.tsx | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 framework/commerce/utils/use-action.tsx diff --git a/framework/commerce/utils/use-action.tsx b/framework/commerce/utils/use-action.tsx deleted file mode 100644 index 24593383f..000000000 --- a/framework/commerce/utils/use-action.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useCallback } from 'react' -import type { HookFetcher, HookFetcherOptions } from './types' -import { useCommerce } from '..' - -export default function useAction( - options: HookFetcherOptions, - fetcher: HookFetcher -) { - const { fetcherRef } = useCommerce() - - return useCallback( - (input: Input) => fetcher(options, input, fetcherRef.current), - [fetcher] - ) -}