| import { |
| planHasFeature, |
| FEATURE_JETPACK_VIDEOPRESS, |
| FEATURE_PREMIUM_SUPPORT, |
| FEATURE_SIMPLE_PAYMENTS, |
| FEATURE_VIDEO_UPLOADS_JETPACK_PRO, |
| FEATURE_WORDADS_INSTANT, |
| } from '@automattic/calypso-products'; |
| import { useTranslate } from 'i18n-calypso'; |
| import * as React from 'react'; |
|
|
| |
| |
| |
| |
| |
|
|
| interface Props { |
| productSlug: string; |
| } |
|
|
| const JetpackGeneralBenefits: React.FC< Props > = ( { productSlug } ) => { |
| const translate = useTranslate(); |
| const benefits = []; |
|
|
| |
| if ( planHasFeature( productSlug, FEATURE_PREMIUM_SUPPORT ) ) { |
| benefits.push( |
| <React.Fragment> |
| { translate( |
| "{{strong}}Priority support{{/strong}} from Jetpack's WordPress and security experts.", |
| { |
| components: { |
| strong: <strong />, |
| }, |
| } |
| ) } |
| </React.Fragment> |
| ); |
| } |
|
|
| |
| if ( planHasFeature( productSlug, FEATURE_SIMPLE_PAYMENTS ) ) { |
| benefits.push( |
| <React.Fragment> |
| { translate( 'The ability to {{strong}}collect payments{{/strong}}.', { |
| components: { |
| strong: <strong />, |
| }, |
| } ) } |
| </React.Fragment> |
| ); |
| } |
|
|
| |
| if ( planHasFeature( productSlug, FEATURE_WORDADS_INSTANT ) ) { |
| benefits.push( |
| <React.Fragment> |
| { translate( 'The {{strong}}Ad program{{/strong}} for WordPress.', { |
| components: { |
| strong: <strong />, |
| }, |
| } ) } |
| </React.Fragment> |
| ); |
| } |
|
|
| |
| if ( planHasFeature( productSlug, FEATURE_JETPACK_VIDEOPRESS ) ) { |
| benefits.push( |
| <React.Fragment> |
| { translate( 'Up to 1TB of {{strong}}high-speed video hosting{{/strong}}.', { |
| components: { |
| strong: <strong />, |
| }, |
| } ) } |
| </React.Fragment> |
| ); |
| } |
| |
| else if ( planHasFeature( productSlug, FEATURE_VIDEO_UPLOADS_JETPACK_PRO ) ) { |
| benefits.push( |
| <React.Fragment> |
| { translate( 'Up to 13GB of {{strong}}high-speed video hosting{{/strong}}.', { |
| components: { |
| strong: <strong />, |
| }, |
| } ) } |
| </React.Fragment> |
| ); |
| } |
|
|
| |
| benefits.push( |
| <React.Fragment> |
| { translate( |
| 'Brute force {{strong}}attack protection{{/strong}} and {{strong}}downtime monitoring{{/strong}}.', |
| { |
| components: { |
| strong: <strong />, |
| }, |
| } |
| ) } |
| </React.Fragment> |
| ); |
|
|
| return ( |
| <ul className="jetpack-benefits__general-benefit-list"> |
| { benefits.map( ( benefit, idx ) => { |
| return <li key={ idx }>{ benefit }</li>; |
| } ) } |
| </ul> |
| ); |
| }; |
|
|
| export default JetpackGeneralBenefits; |
|
|