import { IFlowNode } from '@/types/flow'; import { Avatar, Empty, List } from 'antd'; import React, { DragEvent } from 'react'; import { useTranslation } from 'react-i18next'; const StaticNodes: React.FC<{ nodes: IFlowNode[] }> = ({ nodes }) => { const { t } = useTranslation(); function onDragStart(event: DragEvent, node: IFlowNode) { event.dataTransfer.setData('application/reactflow', JSON.stringify(node)); event.dataTransfer.effectAllowed = 'move'; } if (nodes?.length > 0) { return ( ( onDragStart(event, node)} > } title={

{node.label}

} description={

{node.description}

} />
)} /> ); } else { return ; } }; export default StaticNodes;