Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
element = createElement(source.type, {}, target);
}
let column;
if (element.type !== "column") {
column = createColumn({ elements: [element] });
}
// Add new child element
let row = addElementToParent(column || element, target, position);
// Recalculate column widths
row = distributeColumnWidths(row);
// Dispatch update action
dispatch(updateElement({ element: row }));
if (source.path) {
dispatch(deleteElement({ element: source }));
}
if (dispatchNew) {
dispatch(elementCreated({ element, source }));
}
},
onClick={() => dispatch(ActionCreators.redo())}
icon={}
onClick={() => dispatch(ActionCreators.undo())}
icon={}