'use client' import type { FC } from 'react' import React from 'react' import { useRouter } from 'next/navigation' import { RiDeleteBinLine, RiInformation2Line, RiLoopLeftLine } from '@remixicon/react' import { useBoolean } from 'ahooks' import PluginInfo from '../plugin-page/plugin-info' import ActionButton from '../../base/action-button' type Props = { pluginId: string isShowFetchNewVersion: boolean isShowInfo: boolean isShowDelete: boolean onDelete: () => void } const Action: FC = ({ isShowFetchNewVersion, isShowInfo, isShowDelete, onDelete, }) => { const router = useRouter() const [isShowPluginInfo, { setTrue: showPluginInfo, setFalse: hidePluginInfo, }] = useBoolean(false) const handleFetchNewVersion = () => { } // const handleDelete = () => { } return (
{isShowFetchNewVersion && } { isShowInfo && } { isShowDelete && } {isShowPluginInfo && ( )}
) } export default React.memo(Action)