import type { FC } from 'react' import React from 'react' import type { PluginTriggerNodeType } from './types' import type { NodeProps } from '@/app/components/workflow/types' import useConfig from './use-config' const Node: FC> = ({ id, data, }) => { const { isAuthenticated } = useConfig(id, data) const { config = {} } = data const configKeys = Object.keys(config) // Only show config when authenticated and has config values if (!isAuthenticated || configKeys.length === 0) return null return (
{configKeys.map((key, index) => (
{key}
{typeof config[key] === 'string' && config[key].includes('secret') ? '********' : String(config[key] || '')}
))}
) } export default React.memo(Node)