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:
parent
b33878088e
commit
4d04400309
2 changed files with 6 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ export default function StorePage(): JSX.Element {
|
||||||
getComponent(flowId).then(
|
getComponent(flowId).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
const newFLow = cloneFLowWithParent(res.data, is_component);
|
const newFLow = cloneFLowWithParent(res.data, res.id, is_component);
|
||||||
console.log(newFLow);
|
console.log(newFLow);
|
||||||
saveFlowStore(newFLow).then(
|
saveFlowStore(newFLow).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
import { cloneDeep } from "lodash";
|
import { cloneDeep } from "lodash";
|
||||||
import { FlowType } from "../types/flow";
|
import { FlowType } from "../types/flow";
|
||||||
|
|
||||||
export default function cloneFLowWithParent(flow: FlowType, is_component) {
|
export default function cloneFLowWithParent(
|
||||||
const parent = flow.id;
|
flow: FlowType,
|
||||||
|
parent: string,
|
||||||
|
is_component: boolean
|
||||||
|
) {
|
||||||
let childFLow = cloneDeep(flow);
|
let childFLow = cloneDeep(flow);
|
||||||
childFLow.parent = parent;
|
childFLow.parent = parent;
|
||||||
childFLow.id = "";
|
childFLow.id = "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue