Skip to content

Commit 0ced081

Browse files
committedJul 25, 2024
fix(hooks): pass onExecute callback to handler in useAction
1 parent 8207452 commit 0ced081

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎packages/next-safe-action/src/hooks.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ export const useAction = <
113113
result: result ?? {},
114114
input: clientInput as S extends Schema ? InferIn<S> : undefined,
115115
status,
116-
cb: { onSuccess: utils?.onSuccess, onError: utils?.onError, onSettled: utils?.onSettled },
116+
cb: {
117+
onExecute: utils?.onExecute,
118+
onSuccess: utils?.onSuccess,
119+
onError: utils?.onError,
120+
onSettled: utils?.onSettled,
121+
},
117122
});
118123

119124
return {

0 commit comments

Comments
 (0)
Please sign in to comment.