'use client' import type { FC } from 'react' import React from 'react' import type { PluginDeclaration } from '../../types' import Card from '../../card' import Button from '@/app/components/base/button' import { pluginManifestToCardPluginProps } from '../utils' import { useTranslation } from 'react-i18next' import Badge, { BadgeState } from '@/app/components/base/badge/index' type Props = { payload?: PluginDeclaration | null isFailed: boolean errMsg?: string | null onCancel: () => void } const Installed: FC = ({ payload, isFailed, errMsg, onCancel, }) => { const { t } = useTranslation() return ( <>

{(isFailed && errMsg) ? errMsg : t(`plugin.installModal.${isFailed ? 'installFailedDesc' : 'installedSuccessfullyDesc'}`)}

{payload && (
{payload.version}} />
)}
{/* Action Buttons */}
) } export default React.memo(Installed)