From d2705e9600702c5a9c64a1f738908491c5181c06 Mon Sep 17 00:00:00 2001 From: jiangchu Date: Tue, 19 Sep 2023 11:27:30 +0800 Subject: [PATCH] :bug: fix: react-flow-attribution remove --- src/ProFlow/index.tsx | 2 +- src/ProFlow/styles.tsx | 4 ++++ src/ProFlowController/index.tsx | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ProFlow/index.tsx b/src/ProFlow/index.tsx index 3eaaf9d..6fe444c 100644 --- a/src/ProFlow/index.tsx +++ b/src/ProFlow/index.tsx @@ -1,5 +1,5 @@ import ProFlowController from '@/ProFlowController'; -import { useMemo, type CSSProperties, type MouseEvent as ReactMouseEvent } from 'react'; +import React, { useMemo, type CSSProperties, type MouseEvent as ReactMouseEvent } from 'react'; import ReactFlow, { Background, BackgroundVariant, Edge, Node } from 'reactflow'; import { ProFLowEdge, ProFlowNode } from './constants'; import { convertMappingFrom, getRenderData } from './helper'; diff --git a/src/ProFlow/styles.tsx b/src/ProFlow/styles.tsx index 3179466..93f1a7e 100644 --- a/src/ProFlow/styles.tsx +++ b/src/ProFlow/styles.tsx @@ -6,6 +6,10 @@ export const useStyles = createStyles(({ css }) => ({ width: 100%; height: 100%; + .react-flow__attribution { + display: none; + } + .${INIT_NODE} { padding: 0; box-sizing: border-box; diff --git a/src/ProFlowController/index.tsx b/src/ProFlowController/index.tsx index 05a0a69..b42bae1 100644 --- a/src/ProFlowController/index.tsx +++ b/src/ProFlowController/index.tsx @@ -1,6 +1,7 @@ import { ExpandOutlined, MinusOutlined, PlusOutlined } from '@ant-design/icons'; import { Button, Space, Tooltip } from 'antd'; import { createStyles } from 'antd-style'; +import React from 'react'; import { MiniMap, useReactFlow, useViewport } from 'reactflow'; const useStyles = createStyles(({ css }) => ({