import React from 'react'; import {Layer, Rectangle} from 'recharts'; import NodeButton from './NodeButton'; interface CustomNodeProps { x: number; y: number; width: number; height: number; index: number; payload: any; containerWidth: number; activeNodes: any[]; } const CustomNode: React.FC = (props) => { const {x, y, width, height, index, payload, containerWidth} = props; const isOut = x + width + 6 > containerWidth; const isDemo = payload.isDemo; const isDropoff = payload.name === 'Dropoff'; return ( {!isDemo ? ( ) : (
{payload.name}
)}
); } export default CustomNode;