Improve API + set functions in state (#17560)
Prefetch functions and set these in state --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
@@ -36,8 +36,7 @@ export const useCreateStep = () => {
|
||||
connectionOptions,
|
||||
shouldSelectNode = true,
|
||||
workflowVersionId: providedWorkflowVersionId,
|
||||
logicFunctionId,
|
||||
name,
|
||||
defaultSettings,
|
||||
}: {
|
||||
newStepType: WorkflowActionType;
|
||||
parentStepId: string | undefined;
|
||||
@@ -46,8 +45,7 @@ export const useCreateStep = () => {
|
||||
connectionOptions?: WorkflowStepConnectionOptions;
|
||||
shouldSelectNode?: boolean;
|
||||
workflowVersionId?: string;
|
||||
logicFunctionId?: string;
|
||||
name?: string;
|
||||
defaultSettings?: Record<string, unknown>;
|
||||
}) => {
|
||||
if (isLoading === true) {
|
||||
return;
|
||||
@@ -69,8 +67,7 @@ export const useCreateStep = () => {
|
||||
nextStepId,
|
||||
position,
|
||||
parentStepConnectionOptions: connectionOptions,
|
||||
logicFunctionId,
|
||||
name,
|
||||
defaultSettings,
|
||||
})
|
||||
)?.data?.createWorkflowVersionStep;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user