remove custom node
This commit is contained in:
@@ -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 | { type: 'canvas' | 'node'; nodeId?: string; clientX: number; clientY: number }>(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() {
|
||||
<ContextMenuLabel>New Node</ContextMenuLabel>
|
||||
<ContextMenuItem onSelect={() => createNode('config')}>Config</ContextMenuItem>
|
||||
<ContextMenuItem onSelect={() => createNode('render')}>Renderer</ContextMenuItem>
|
||||
<ContextMenuItem onSelect={() => createNode('custom')}>Custom</ContextMenuItem>
|
||||
</ContextMenuGroup>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user