diff --git a/src/components/tree/flow.component.tsx b/src/components/tree/flow.component.tsx index 82aa36a..d65bcb8 100644 --- a/src/components/tree/flow.component.tsx +++ b/src/components/tree/flow.component.tsx @@ -36,10 +36,9 @@ const Flow = () => { useEffect(() => { if (selected) { - console.log(selected); fitView({ nodes: [selected], duration: 800 }); } - }, [fitView, getViewport, selected, setViewport]); + }, [fitView, getViewport, selected, setViewport, nodes]); useEffect(() => { getPersonNodeById('7').then((x) => { @@ -58,7 +57,7 @@ const Flow = () => { setNodes(nodes); setEdges(edges); }); - }, [setEdges, setNodes, fitView]); + }, [setEdges, setNodes]); return (