fix(StorePage): fix typo in function name from cloneFLowWithParent to cloneFlowWithParent

fix(storeUtils): add missing type annotations to function parameters in cloneFlowWithParent function
This commit is contained in:
anovazzi1 2023-10-23 23:47:45 -03:00
commit 4d04400309
2 changed files with 6 additions and 3 deletions

View file

@ -87,7 +87,7 @@ export default function StorePage(): JSX.Element {
getComponent(flowId).then(
(res) => {
console.log(res);
const newFLow = cloneFLowWithParent(res.data, is_component);
const newFLow = cloneFLowWithParent(res.data, res.id, is_component);
console.log(newFLow);
saveFlowStore(newFLow).then(
(res) => {

View file

@ -1,8 +1,11 @@
import { cloneDeep } from "lodash";
import { FlowType } from "../types/flow";
export default function cloneFLowWithParent(flow: FlowType, is_component) {
const parent = flow.id;
export default function cloneFLowWithParent(
flow: FlowType,
parent: string,
is_component: boolean
) {
let childFLow = cloneDeep(flow);
childFLow.parent = parent;
childFLow.id = "";