'use client' import type { FC } from 'react' import React from 'react' import type { PluginDeclaration } from '../../../types' import Card from '../../../card' import { pluginManifestToCardPluginProps } from '../../utils' import Button from '@/app/components/base/button' import { sleep } from '@/utils' type Props = { payload: PluginDeclaration onCancel: () => void onInstalled: () => void } const Installed: FC = ({ payload, onCancel, onInstalled, }) => { const [isInstalling, setIsInstalling] = React.useState(false) const handleInstall = async () => { if (isInstalling) return setIsInstalling(true) await sleep(1500) onInstalled() } return ( <>

About to install the following plugin.

Please make sure that you only install plugins from a trusted source.

{/* Action Buttons */}
{!isInstalling && ( )}
) } export default React.memo(Installed)