import type { FC } from 'react' import { memo } from 'react' import type { NodeProps } from '@/app/components/workflow/types' import { InstallPluginButton } from '@/app/components/workflow/nodes/_base/components/install-plugin-button' import { useNodePluginInstallation } from '@/app/components/workflow/hooks/use-node-plugin-installation' import type { DataSourceNodeType } from './types' const Node: FC> = ({ data, }) => { const { isChecking, isMissing, uniqueIdentifier, canInstall, onInstallSuccess, } = useNodePluginInstallation(data) const showInstallButton = !isChecking && isMissing && canInstall && uniqueIdentifier if (!showInstallButton) return null return (
) } export default memo(Node)