Fix flow duplication and navigation bug in MenuBar component

This commit is contained in:
anovazzi1 2024-03-19 18:08:21 -03:00
commit a02b2e1776

View file

@ -45,8 +45,9 @@ export const MenuBar = ({
if (!currentFlow) {
throw new Error("No flow to duplicate");
}
addFlow(true, currentFlow).then((_) => {
addFlow(true, currentFlow).then((id) => {
setSuccessData({title:"Flow duplicated successfully"});
navigate("/flow/" + id);
});
}
else
@ -74,7 +75,7 @@ export const MenuBar = ({
<button
onClick={() => {
removeFunction(nodes);
navigate(-1);
navigate("/");
}}
>
<IconComponent name="ChevronLeft" className="w-4" />