import type { FC } from 'react' import React from 'react' import type { PluginTriggerNodeType } from './types' import type { NodeProps } from '@/app/components/workflow/types' const Node: FC> = ({ data, }) => { const { config = {} } = data const configKeys = Object.keys(config) if (!data.plugin_name && configKeys.length === 0) return null return (
{data.plugin_name && (
{data.plugin_name} {data.event_type && (
{data.event_type}
)}
)} {configKeys.length > 0 && (
{configKeys.map((key, index) => (
{key}
{typeof config[key] === 'string' && config[key].includes('secret') ? '********' : String(config[key] || '')}
))}
)}
) } export default React.memo(Node)