mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-12 19:02:53 +08:00
feat: remove unused ref
This commit is contained in:
parent
6c072b8b2b
commit
4787758551
@ -2,7 +2,7 @@ import React from "react";
|
|||||||
import dynamic from "next/dynamic";
|
import dynamic from "next/dynamic";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { ReactZoomPanPinchRef, TransformComponent, TransformWrapper } from "react-zoom-pan-pinch";
|
import { ReactZoomPanPinchRef, TransformComponent, TransformWrapper } from "react-zoom-pan-pinch";
|
||||||
import { CanvasRef, Edge, EdgeProps, ElkRoot, NodeProps } from "reaflow";
|
import { Edge, EdgeProps, ElkRoot, NodeProps } from "reaflow";
|
||||||
import { CustomNode } from "src/components/CustomNode";
|
import { CustomNode } from "src/components/CustomNode";
|
||||||
import useToggleHide from "src/hooks/useToggleHide";
|
import useToggleHide from "src/hooks/useToggleHide";
|
||||||
import useGraph from "src/store/useGraph";
|
import useGraph from "src/store/useGraph";
|
||||||
@ -65,7 +65,6 @@ export const Graph = ({ isWidget = false }: GraphProps) => {
|
|||||||
const centerView = useGraph(state => state.centerView);
|
const centerView = useGraph(state => state.centerView);
|
||||||
const setSelectedNode = useGraph(state => state.setSelectedNode);
|
const setSelectedNode = useGraph(state => state.setSelectedNode);
|
||||||
const setVisible = useModal(state => state.setVisible);
|
const setVisible = useModal(state => state.setVisible);
|
||||||
const canvasRef = React.useRef<CanvasRef>(null);
|
|
||||||
|
|
||||||
const loading = useGraph(state => state.loading);
|
const loading = useGraph(state => state.loading);
|
||||||
const direction = useGraph(state => state.direction);
|
const direction = useGraph(state => state.direction);
|
||||||
@ -160,7 +159,6 @@ export const Graph = ({ isWidget = false }: GraphProps) => {
|
|||||||
>
|
>
|
||||||
<Canvas
|
<Canvas
|
||||||
className="jsoncrack-canvas"
|
className="jsoncrack-canvas"
|
||||||
ref={canvasRef}
|
|
||||||
nodes={nodes}
|
nodes={nodes}
|
||||||
edges={edges}
|
edges={edges}
|
||||||
maxHeight={paneHeight}
|
maxHeight={paneHeight}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user