useActionCallback.js
2 years ago
useActionDetail.js
2 years ago
useActions.js
2 years ago
useActionsEdit.js
2 years ago
useCurrentAction.js
2 years ago
useRequestFields.js
2 years ago
useSanitizeFieldsMap.js
2 years ago
useUpdateCurrentAction.js
2 years ago
useUpdateCurrentActionMeta.js
2 years ago
withCurrentAction.js
2 years ago
withDispatchActionLoading.js
2 years ago
withRequestFields.js
2 years ago
withSelectActionLoading.js
2 years ago
useUpdateCurrentActionMeta.js
17 lines
| 1 | import useCurrentAction from './useCurrentAction'; |
| 2 | import useActionsEdit from './useActionsEdit'; |
| 3 | |
| 4 | /** |
| 5 | * Update action in meta |
| 6 | * @returns {function(*=): void} |
| 7 | */ |
| 8 | export const useUpdateCurrentActionMeta = () => { |
| 9 | const { currentAction } = useCurrentAction(); |
| 10 | const { updateActionObj } = useActionsEdit(); |
| 11 | |
| 12 | return newProps => { |
| 13 | updateActionObj( currentAction.id, newProps ); |
| 14 | }; |
| 15 | }; |
| 16 | |
| 17 | export default useUpdateCurrentActionMeta; |