Skip to content

Commit

Permalink
Remove onConnect callback, edges are created via a config file
Browse files Browse the repository at this point in the history
  • Loading branch information
makaroni4 committed Jan 21, 2023
1 parent 809c81a commit 1fde8b1
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Visualizer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ function Flow() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);
const [edges, setEdges, onEdgesChange] = useEdgesState([]);
const onConnect = useCallback(
(params: Connection | Edge) => setEdges((eds) => addEdge(params, eds)),
[setEdges]
);
const [fullscreenOn, setFullScreen] = useState(false);
const [infoPopupOn, setInfoPopupOn] = useState(false);
let nodeHoverActive = true;
Expand Down Expand Up @@ -420,7 +416,6 @@ function Flow() {
onNodesChange={handleNodesChange}
edges={edges}
onEdgesChange={onEdgesChange}
onConnect={onConnect}
onInit={onInit}
snapToGrid={true}
fitView
Expand Down

0 comments on commit 1fde8b1

Please sign in to comment.