File size: 819 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import { useSelector } from 'calypso/state';
import { getPluginOnSite } from 'calypso/state/plugins/installed/selectors';
import PluginRemoveButton from '../../plugin-remove-button';
import type { PluginComponentProps } from '../types';
import type { SiteDetails } from '@automattic/data-stores';
import '../style.scss';
interface Props {
site: SiteDetails;
plugin: PluginComponentProps;
}
export default function RemovePlugin( { site, plugin }: Props ) {
const pluginOnSite = useSelector( ( state ) => getPluginOnSite( state, site.ID, plugin.slug ) );
return (
<PluginRemoveButton
key={ `remove-plugin-${ site.ID }` }
plugin={ pluginOnSite }
site={ site }
menuItem
isJetpackCloud
isMarketplaceProduct={ plugin.isMarketplaceProduct }
classNames="plugin-management-v2__actions"
/>
);
}
|