import { type FC } from 'react'; import { useTranslation } from 'react-i18next' import { Card, Space } from 'antd' import { nodeLibrary } from '../constant'; const NodeLibrary: FC = () => { const { t } = useTranslation() console.log('nodeLibrary', nodeLibrary) return (
{nodeLibrary.map(category => ( {category.nodes .filter(node => node.type !== 'cycle-start' && node.type !== 'break') .map((node, nodeIndex) => (
{ e.dataTransfer.setData('application/reactflow', node.type); e.dataTransfer.setData('application/json', JSON.stringify(node)); }} > {t(`workflow.${node.type}`)}
))}
))}
); }; export default NodeLibrary;