From 01b1ade33984ca37090f432f45226b5f940ba5eb Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:44:29 +0300 Subject: [PATCH] M: Remove unused dependencies --- rsconcept/frontend/src/dialogs/DlgShowAST/ASTFlow.tsx | 5 ++--- .../frontend/src/dialogs/DlgShowTypeGraph/MGraphFlow.tsx | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rsconcept/frontend/src/dialogs/DlgShowAST/ASTFlow.tsx b/rsconcept/frontend/src/dialogs/DlgShowAST/ASTFlow.tsx index a9064d80..729aaba7 100644 --- a/rsconcept/frontend/src/dialogs/DlgShowAST/ASTFlow.tsx +++ b/rsconcept/frontend/src/dialogs/DlgShowAST/ASTFlow.tsx @@ -1,7 +1,7 @@ 'use client'; import { useLayoutEffect } from 'react'; -import { Edge, MarkerType, Node, ReactFlow, useEdgesState, useNodesState, useReactFlow } from 'reactflow'; +import { Edge, MarkerType, Node, ReactFlow, useEdgesState, useNodesState } from 'reactflow'; import { SyntaxTree } from '@/models/rslang'; @@ -18,7 +18,6 @@ interface ASTFlowProps { function ASTFlow({ data, onNodeEnter, onNodeLeave }: ASTFlowProps) { const [nodes, setNodes, onNodesChange] = useNodesState([]); const [edges, setEdges] = useEdgesState([]); - const flow = useReactFlow(); useLayoutEffect(() => { const newNodes = data.map(node => ({ @@ -50,7 +49,7 @@ function ASTFlow({ data, onNodeEnter, onNodeLeave }: ASTFlowProps) { setNodes(newNodes); setEdges(newEdges); - }, [data, setNodes, setEdges, flow]); + }, [data, setNodes, setEdges]); return ( { const newNodes = data.nodes.map(node => ({ @@ -52,7 +51,7 @@ function MGraphFlow({ data }: MGraphFlowProps) { setNodes(newNodes); setEdges(newEdges); - }, [data, setNodes, setEdges, flow]); + }, [data, setNodes, setEdges]); return (