'use client' import type { FC } from 'react' import React from 'react' import { useRouter } from 'next/navigation' import { RiDeleteBinLine, RiInformation2Line, RiLoopLeftLine } from '@remixicon/react' type Props = { pluginId: string isShowFetchNewVersion: boolean isShowInfo: boolean isShowDelete: boolean onDelete: () => void } const Action: FC = ({ isShowFetchNewVersion, isShowInfo, isShowDelete, onDelete, }) => { const router = useRouter() const handleFetchNewVersion = () => { } const handleShowInfo = () => { router.refresh() // refresh the page ... } // const handleDelete = () => { } return (
{isShowFetchNewVersion &&
} { isShowInfo &&
} { isShowDelete &&
}
) } export default React.memo(Action)