Skip to content

Commit

Permalink
Merge pull request #101 from Tauffer-Consulting/hotfix/save-to-forage…
Browse files Browse the repository at this point in the history
…-before-create-workflow

fix: save to forage before create workflow
  • Loading branch information
nathan-vm authored Oct 10, 2023
2 parents 61383a0 + 50a991d commit edee3cc
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const WorkflowsEditorComponent: React.FC = () => {

const handleSaveWorkflow = useCallback(async () => {
try {
await saveDataToLocalForage();
setBackdropIsOpen(true);
if (!workspace?.id) {
throw new Error("No selected Workspace");
Expand Down Expand Up @@ -231,17 +232,13 @@ export const WorkflowsEditorComponent: React.FC = () => {
const nodeData = event.dataTransfer.getData("application/reactflow");
const { ...data } = JSON.parse(nodeData);

console.log("orientation", orientation);

const newNodeData: DefaultNode["data"] = {
name: data.name,
style: data.style,
validationError: false,
orientation,
};

console.log("newNodeData", newNodeData);

const newNode = {
id: getId(data.id),
type: "CustomNode",
Expand Down

0 comments on commit edee3cc

Please sign in to comment.