'use client' import { RiKey2Line } from '@remixicon/react' import { useState } from 'react' import { useTranslation } from 'react-i18next' import Button from '@/app/components/base/button' import SecretKeyModal from '@/app/components/develop/secret-key/secret-key-modal' type ISecretKeyButtonProps = { className?: string appId?: string textCls?: string } const SecretKeyButton = ({ className, appId, textCls }: ISecretKeyButtonProps) => { const [isVisible, setVisible] = useState(false) const { t } = useTranslation() return ( <> setVisible(true)} size="small" variant="ghost" > {t('apiKey', { ns: 'appApi' })} setVisible(false)} appId={appId} /> > ) } export default SecretKeyButton