Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

chore(web): resolve eslint error for node/panel components in CustomNode renderer (#42470)

invalid wd8187b6e512a
diff --git a/oxlint-suppressions.json b/oxlint-suppressions.json
index 6dcce0d5363..55740edb20c 100644
--- a/oxlint-suppressions.json
+++ b/oxlint-suppressions.json
@@ -3177,11 +3177,6 @@
"count": 5
}
},
- "web/app/components/workflow/nodes/index.tsx": {
- "eslint-react/static-components": {
- "count": 2
- }
- },
"web/app/components/workflow/nodes/iteration/node.tsx": {
"eslint-react/set-state-in-effect": {
"count": 1
diff --git a/web/app/components/workflow/nodes/index.tsx b/web/app/components/workflow/nodes/index.tsx
index f8340078763..4d5e8731086 100644
--- a/web/app/components/workflow/nodes/index.tsx
+++ b/web/app/components/workflow/nodes/index.tsx
@@ -1,18 +1,16 @@
import type { NodeProps } from 'reactflow'
-import { memo, useMemo } from 'react'
+import { memo } from 'react'
import BaseNode from './_base/node'
import { NodeComponentMap } from './components'
const CustomNode = (props: NodeProps) => {
const nodeData = props.data
- const NodeComponent = useMemo(() => NodeComponentMap[nodeData.type], [nodeData.type])!
+ const NodeComponent = NodeComponentMap[nodeData.type]!
return (
- <>
- <BaseNode id={props.id} data={props.data}>
- <NodeComponent />
- </BaseNode>
- </>
+ <BaseNode id={props.id} data={props.data}>
+ <NodeComponent />
+ </BaseNode>
)
}
CustomNode.displayName = 'CustomNode'