import { Card } from '@automattic/components'; import { useTranslate } from 'i18n-calypso'; import PropTypes from 'prop-types'; import { Fragment } from 'react'; import CardHeading from 'calypso/components/card-heading'; import { useLocalizedMoment } from 'calypso/components/localized-moment'; import './style.scss'; export default function PaymentMethodSidebar( { purchase } ) { const translate = useTranslate(); return ( { translate( 'Security' ) }

{ translate( 'Your payment details are safe. We will transfer them over an encrypted connection and store them on a certified payment processing server.' ) }

); } function MainCard( { purchase } ) { const translate = useTranslate(); const moment = useLocalizedMoment(); if ( purchase ) { const purchaseMessaging = purchase.renewDate ? translate( 'Next payment on %s', { args: moment( purchase.renewDate ).format( 'LL' ) } ) : translate( 'Expires on %s', { args: moment( purchase.expiryDate ).format( 'LL' ) } ); return ( { translate( 'Purchase Details' ) }

{ purchase.productName }
{ purchaseMessaging }

); } return null; } PaymentMethodSidebar.propTypes = { purchase: PropTypes.object, };