We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde102d commit 8585af9Copy full SHA for 8585af9
src/frontend/src/hooks/flows/use-add-flow.ts
@@ -64,11 +64,10 @@ const useAddFlow = () => {
64
newFlow.folder_id = folder_id;
65
66
postAddFlow(newFlow, {
67
- onSuccess: ({ id }) => {
68
- newFlow.id = id;
+ onSuccess: (createdFlow) => {
69
// Add the new flow to the list of flows.
70
const { data, flows: myFlows } = processFlows([
71
- newFlow,
+ createdFlow,
72
...(flows ?? []),
73
]);
74
setFlows(myFlows);
@@ -79,7 +78,7 @@ const useAddFlow = () => {
79
78
["saved_components"]: data,
80
}),
81
}));
82
- resolve(id);
+ resolve(createdFlow.id);
83
},
84
onError: (error) => {
85
if (error.response?.data?.detail) {
0 commit comments