import { Card, Gridicon } from '@automattic/components'; import { useTranslate } from 'i18n-calypso'; import * as React from 'react'; import ActivityActor from 'calypso/components/activity-card/activity-actor'; import Button from 'calypso/components/forms/form-button'; import { applySiteOffset } from 'calypso/lib/site/timezone'; import { useSelector } from 'calypso/state'; import getSiteGmtOffset from 'calypso/state/selectors/get-site-gmt-offset'; import getSiteTimezoneValue from 'calypso/state/selectors/get-site-timezone-value'; import { getSelectedSiteId, getSelectedSiteSlug } from 'calypso/state/ui/selectors'; import type { Activity } from './types'; import './style.scss'; type OwnProps = { className?: string; summarize?: boolean; shareable?: boolean; activity: Activity; availableActions?: Array< string >; onClickClone?: ( period: string ) => void; }; type Props = OwnProps & { upsellPlanName: string; }; const PlanUpsellCard: React.FC< Props > = ( { upsellPlanName } ) => { const siteId = useSelector( getSelectedSiteId ) as number; const siteSlug = useSelector( getSelectedSiteSlug ); const gmtOffset = useSelector( ( state ) => getSiteGmtOffset( state, siteId ) ); const timezone = useSelector( ( state ) => getSiteTimezoneValue( state, siteId ) ); const currentDateDisplay = applySiteOffset( Date.now(), { gmtOffset, timezone } ).format( 'LT' ); const translate = useTranslate(); return (
{ translate( 'Upgrade to %(planName)s plan or higher to unlock more powerful features.', { args: { planName: upsellPlanName, }, comment: '%(planName)s is the name of the selected plan.', } ) }