Fix flow duplication and navigation bug in MenuBar component
This commit is contained in:
parent
633881c652
commit
a02b2e1776
1 changed files with 3 additions and 2 deletions
|
|
@ -45,8 +45,9 @@ export const MenuBar = ({
|
||||||
if (!currentFlow) {
|
if (!currentFlow) {
|
||||||
throw new Error("No flow to duplicate");
|
throw new Error("No flow to duplicate");
|
||||||
}
|
}
|
||||||
addFlow(true, currentFlow).then((_) => {
|
addFlow(true, currentFlow).then((id) => {
|
||||||
setSuccessData({title:"Flow duplicated successfully"});
|
setSuccessData({title:"Flow duplicated successfully"});
|
||||||
|
navigate("/flow/" + id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -74,7 +75,7 @@ export const MenuBar = ({
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
removeFunction(nodes);
|
removeFunction(nodes);
|
||||||
navigate(-1);
|
navigate("/");
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconComponent name="ChevronLeft" className="w-4" />
|
<IconComponent name="ChevronLeft" className="w-4" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue