Skip to content

Commit

Permalink
Backup: fix backup pricing placeholder (#40157)
Browse files Browse the repository at this point in the history
* Fix backup pricing card loading placeholder

* Changelog

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11825621230

Upstream-Ref: Automattic/jetpack@3eeff5b
  • Loading branch information
Initsogar authored and matticbot committed Nov 13, 2024
1 parent 5d0ddf1 commit c2dd31e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ This is an alpha version! The changes listed here are not final.
### Added
- Adds tooltips for each ThreatFixerButton state

### Fixed
- Fixes the loading placeholder that didn't disappear when the price loads.

## [0.59.0] - 2024-11-11
### Added
- Add ThreatsDataViews component [#39754]
Expand Down
5 changes: 2 additions & 3 deletions components/pricing-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ const PricingCard: React.FC< PricingCardProps > = ( {
) }
<h1 className="jp-components__pricing-card__title">{ props.title }</h1>
<div className="jp-components__pricing-card__pricing">
{ props.priceBefore !== props.priceAfter && props.priceAfter > 0 ? (
{ props.priceAfter === 0 && <LoadingPlaceholder width="100%" height={ 48 } /> }
{ props.priceBefore !== props.priceAfter && props.priceAfter > 0 && (
<div className="jp-components__pricing-card__price-before">
<span className="jp-components__pricing-card__currency">
{ currencyObjectBefore.symbol }
Expand All @@ -71,8 +72,6 @@ const PricingCard: React.FC< PricingCardProps > = ( {
) }
<div className="jp-components__pricing-card__price-strikethrough"></div>
</div>
) : (
<LoadingPlaceholder width="100%" height={ 48 } />
) }
{ props.priceAfter > 0 && (
<>
Expand Down

0 comments on commit c2dd31e

Please sign in to comment.