From add0299a30de866fc469223a6ab056afd1c58d5b Mon Sep 17 00:00:00 2001 From: dtoro Date: Fri, 6 Mar 2026 09:53:16 +0100 Subject: [PATCH] remove custom node --- src/App.tsx | 6 ++---- src/components/CustomNode.tsx | 31 ------------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 src/components/CustomNode.tsx diff --git a/src/App.tsx b/src/App.tsx index 9d6b5ad..5444360 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,7 +14,6 @@ import ReactFlow, { NodeChange, EdgeChange, } from 'reactflow' -import CustomNode from './components/CustomNode' import ConfigNode from './components/ConfigNode' import RenderingNode from './components/RenderingNode' import FlowContext from './lib/flowContext' @@ -56,7 +55,7 @@ export default function App() { const [contextTarget, setContextTarget] = React.useState(null) const nodeTypes = React.useMemo( - () => ({ custom: CustomNode, config: ConfigNode, render: RenderingNode }), + () => ({ config: ConfigNode, render: RenderingNode }), [] ) @@ -107,7 +106,7 @@ export default function App() { const id = genId() const newNode: Node = { id, - type: type === 'custom' ? 'custom' : type === 'config' ? 'config' : 'render', + type: type === 'config' ? 'config' : 'render', position: { x: position.x, y: position.y }, data: type === 'config' ? { yaml: '# Enter YAML here\n', title: `config-${id}` } : {}, } @@ -157,7 +156,6 @@ export default function App() { New Node createNode('config')}>Config createNode('render')}>Renderer - createNode('custom')}>Custom )} diff --git a/src/components/CustomNode.tsx b/src/components/CustomNode.tsx deleted file mode 100644 index 8f9015f..0000000 --- a/src/components/CustomNode.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react' -import { Handle, Position } from 'reactflow' - -export default function CustomNode({ data }: any) { - return ( -
-
-
{data.label}
-
ID: {data?.id ?? ''}
-
- -
Custom content
- -
- - - -
-
- ) -}