Spaces:
Build error
Build error
| import React from 'react'; | |
| import ReactFlow from 'reactflow'; | |
| import 'reactflow/dist/style.css'; | |
| const initialNodes = [ | |
| { | |
| id: '1', | |
| type: 'input', | |
| data: { label: 'Hello' }, | |
| position: { x: 250, y: 0 }, | |
| }, | |
| { | |
| id: '2', | |
| data: { label: 'World' }, | |
| position: { x: 250, y: 100 }, | |
| }, | |
| ]; | |
| const initialEdges = [{ id: 'e1-2', source: '1', target: '2' }]; | |
| const App = () => { | |
| return ( | |
| <div style={{ width: '100%', height: '500px' }}> | |
| <ReactFlow nodes={initialNodes} edges={initialEdges} /> | |
| </div> | |
| ); | |
| }; | |
| export default App; |