Skip to content

Commit

Permalink
Only show Jetpack features if they exist (#96987)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixhours authored Dec 5, 2024
1 parent 6863ba0 commit b32cfb3
Showing 1 changed file with 19 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,25 @@ export const UpgradePlanFeatureList = ( props: Props ) => {
</li>
) ) }

<li className={ clsx( 'import__upgrade-plan-feature logo' ) }>
<JetpackLogo size={ 16 } />
</li>
{ jetpackFeatures?.map( ( feature, i ) => (
<li className={ clsx( 'import__upgrade-plan-feature' ) } key={ i }>
<Plans2023Tooltip
id={ `jetpack-feature-${ i }` }
text={ feature?.getDescription?.() }
setActiveTooltipId={ setActiveTooltipId }
activeTooltipId={ activeTooltipId }
>
<span>{ feature?.getTitle() }</span>
</Plans2023Tooltip>
</li>
) ) }
{ jetpackFeatures && jetpackFeatures.length > 0 && (
<>
<li className={ clsx( 'import__upgrade-plan-feature logo' ) }>
<JetpackLogo size={ 16 } />
</li>
{ jetpackFeatures?.map( ( feature, i ) => (
<li className={ clsx( 'import__upgrade-plan-feature' ) } key={ i }>
<Plans2023Tooltip
id={ `jetpack-feature-${ i }` }
text={ feature?.getDescription?.() }
setActiveTooltipId={ setActiveTooltipId }
activeTooltipId={ activeTooltipId }
>
<span>{ feature?.getTitle() }</span>
</Plans2023Tooltip>
</li>
) ) }
</>
) }
<li className={ clsx( 'import__upgrade-plan-feature logo' ) }>
<strong>{ __( 'Storage' ) }</strong>
</li>
Expand Down

0 comments on commit b32cfb3

Please sign in to comment.