mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix: fix npm build
This commit is contained in:
parent
1a0a18a435
commit
5ee6aab3c9
2 changed files with 8 additions and 3 deletions
|
|
@ -283,7 +283,7 @@ function RenderWorkflow({ initialWorkflowName, workflowId, initialFlow, initialT
|
|||
<Button
|
||||
variant="outline"
|
||||
size="icon"
|
||||
onClick={() => setNodes(layoutNodes(nodes, edges, 'LR', rfInstance, saveWorkflow))}
|
||||
onClick={() => setNodes(layoutNodes(nodes, edges, 'LR', rfInstance))}
|
||||
className="bg-white shadow-sm hover:shadow-md h-8 w-8"
|
||||
>
|
||||
<BrushCleaning className="h-4 w-4" />
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import {
|
|||
OnNodesChange,
|
||||
ReactFlowInstance,
|
||||
} from "@xyflow/react";
|
||||
import { EdgeChange, NodeChange } from "@xyflow/system";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useCallback, useEffect, useRef } from "react";
|
||||
|
||||
|
|
@ -317,7 +318,9 @@ export const useWorkflowState = ({
|
|||
(changes) => {
|
||||
const currentEdges = useWorkflowStore.getState().edges;
|
||||
const newEdges = applyEdgeChanges(changes, currentEdges) as FlowEdge[];
|
||||
setEdges(newEdges, changes);
|
||||
// Cast changes to FlowEdge type - safe because setEdges only uses the type field
|
||||
// to determine history tracking, not the actual item data
|
||||
setEdges(newEdges, changes as EdgeChange<FlowEdge>[]);
|
||||
},
|
||||
[setEdges],
|
||||
);
|
||||
|
|
@ -326,7 +329,9 @@ export const useWorkflowState = ({
|
|||
(changes) => {
|
||||
const currentNodes = useWorkflowStore.getState().nodes;
|
||||
const newNodes = applyNodeChanges(changes, currentNodes) as FlowNode[];
|
||||
setNodes(newNodes, changes);
|
||||
// Cast changes to FlowNode type - safe because setNodes only uses the type field
|
||||
// to determine history tracking, not the actual item data
|
||||
setNodes(newNodes, changes as NodeChange<FlowNode>[]);
|
||||
},
|
||||
[setNodes],
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue