mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
M: Remove unused dependencies
Some checks failed
Frontend CI / build (22.x) (push) Has been cancelled
Some checks failed
Frontend CI / build (22.x) (push) Has been cancelled
This commit is contained in:
parent
f9e6b4673f
commit
93019b45e9
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useLayoutEffect } from 'react';
|
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';
|
import { SyntaxTree } from '@/models/rslang';
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ interface ASTFlowProps {
|
||||||
function ASTFlow({ data, onNodeEnter, onNodeLeave }: ASTFlowProps) {
|
function ASTFlow({ data, onNodeEnter, onNodeLeave }: ASTFlowProps) {
|
||||||
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
||||||
const [edges, setEdges] = useEdgesState([]);
|
const [edges, setEdges] = useEdgesState([]);
|
||||||
const flow = useReactFlow();
|
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
const newNodes = data.map(node => ({
|
const newNodes = data.map(node => ({
|
||||||
|
@ -50,7 +49,7 @@ function ASTFlow({ data, onNodeEnter, onNodeLeave }: ASTFlowProps) {
|
||||||
|
|
||||||
setNodes(newNodes);
|
setNodes(newNodes);
|
||||||
setEdges(newEdges);
|
setEdges(newEdges);
|
||||||
}, [data, setNodes, setEdges, flow]);
|
}, [data, setNodes, setEdges]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ReactFlow
|
<ReactFlow
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useLayoutEffect } from 'react';
|
import { useLayoutEffect } from 'react';
|
||||||
import { Edge, ReactFlow, useEdgesState, useNodesState, useReactFlow } from 'reactflow';
|
import { Edge, ReactFlow, useEdgesState, useNodesState } from 'reactflow';
|
||||||
|
|
||||||
import { TMGraph } from '@/models/TMGraph';
|
import { TMGraph } from '@/models/TMGraph';
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ interface MGraphFlowProps {
|
||||||
function MGraphFlow({ data }: MGraphFlowProps) {
|
function MGraphFlow({ data }: MGraphFlowProps) {
|
||||||
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
const [nodes, setNodes, onNodesChange] = useNodesState([]);
|
||||||
const [edges, setEdges] = useEdgesState([]);
|
const [edges, setEdges] = useEdgesState([]);
|
||||||
const flow = useReactFlow();
|
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
const newNodes = data.nodes.map(node => ({
|
const newNodes = data.nodes.map(node => ({
|
||||||
|
@ -52,7 +51,7 @@ function MGraphFlow({ data }: MGraphFlowProps) {
|
||||||
|
|
||||||
setNodes(newNodes);
|
setNodes(newNodes);
|
||||||
setEdges(newEdges);
|
setEdges(newEdges);
|
||||||
}, [data, setNodes, setEdges, flow]);
|
}, [data, setNodes, setEdges]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ReactFlow
|
<ReactFlow
|
||||||
|
|
Loading…
Reference in New Issue
Block a user