import type { ReactNode } from 'react' import { Button } from '@langgenius/dify-ui/button' import { RiAddLine } from '@remixicon/react' import { memo } from 'react' import { useTranslation } from 'react-i18next' type PluginAuthInDataSourceNodeProps = { children?: ReactNode isAuthorized?: boolean onJumpToDataSourcePage: () => void } const PluginAuthInDataSourceNode = ({ children, isAuthorized, onJumpToDataSourcePage, }: PluginAuthInDataSourceNodeProps) => { const { t } = useTranslation() return ( <> { !isAuthorized && (
) } {isAuthorized && children} ) } export default memo(PluginAuthInDataSourceNode)