Skip to content

Commit

Permalink
fix eslint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Salam-Dalloul committed Dec 4, 2024
1 parent 50ee6dd commit 040c957
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ const GraphDiagram: React.FC<GraphDiagramProps> = ({
});
setIsGraphLocked(lock);
};


// eslint-disable-next-line react-hooks/exhaustive-deps
const initializeGraph = () => {
const model = new DiagramModel();

Expand Down Expand Up @@ -183,7 +184,8 @@ const GraphDiagram: React.FC<GraphDiagramProps> = ({
// This effect runs whenever origins, vias, or destinations change
useEffect(() => {
initializeGraph();
}, [rankdir]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [rankdir, initializeGraph]);

// This effect prevents the default scroll and touchmove behavior
useEffect(() => {
Expand Down Expand Up @@ -222,7 +224,7 @@ const GraphDiagram: React.FC<GraphDiagramProps> = ({
model.getNodes().forEach((node) => {
node.setLocked(isGraphLocked);
});
}, [isGraphLocked]);
}, [isGraphLocked, engine]);


useEffect(() => {
Expand Down

0 comments on commit 040c957

Please sign in to comment.