('');
const [addNodeCallback, setAddNodeCallback] = useState(() => () => {});
const [isTabbarVisible, setIsTabbarVisible] = useState(false);
const { screenToFlowPosition } = useReactFlow();
@@ -290,12 +301,14 @@ const NodeFlow = ({ initialNodes, initialEdges }) => {
const newNodeId = nanoid(8);
const addNodeId = '2';
+ const addNodeKey = 'add-node';
const addNode = nodes.find((node) => node.id === addNodeId);
const targetEdge = edges.find(
(edge) => edge?.source === '2' || edge?.target === '2'
);
const targetNodeId =
targetEdge?.source === '2' ? targetEdge?.target : targetEdge?.source;
+
const targetNode = nodes.find((node) => node.id === targetNodeId);
const newNodePosition = targetNode
@@ -336,7 +349,7 @@ const NodeFlow = ({ initialNodes, initialEdges }) => {