diff --git a/frontend/app/hooks/useAction.ts b/frontend/app/hooks/useAction.ts index 0363773c..3f051588 100644 --- a/frontend/app/hooks/useAction.ts +++ b/frontend/app/hooks/useAction.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { useCallback, useMemo } from 'preact/compat'; +import { useMemo } from 'preact/compat'; import { useDispatch } from 'react-redux'; import { BoundActionCreator, BoundActionCreators } from 'utils/actionBinder'; @@ -19,10 +19,3 @@ export const useActions = ( [dispatch, ...Object.values(actions)] ) as any; }; - -export const useAction = (action: Action): BoundActionCreator => { - const dispatch = useDispatch(); - - // @ts-ignore - return useCallback((...args) => dispatch(action(...args)), [dispatch, action]); -};