@@ -11,15 +11,15 @@ import { dateI18n } from '@wordpress/date';
11
11
import { createInterpolateElement } from '@wordpress/element' ;
12
12
import { __ , sprintf } from '@wordpress/i18n' ;
13
13
import { sitePHPVersionQuery , siteCurrentPlanQuery } from '../../app/queries' ;
14
- import { getIsBlurredProps } from '../../utils/is-blurred' ;
14
+ import { IS_BLURRED_PROPS } from '../../utils/is-blurred' ;
15
15
import { getSiteStatusLabel } from '../../utils/site-status' ;
16
16
import { getFormattedWordPressVersion } from '../../utils/wp-version' ;
17
17
import SitePreview from '../site-preview' ;
18
18
import type { Site } from '../../data/types' ;
19
19
20
20
function PHPVersion ( { siteSlug } : { siteSlug : string } ) {
21
21
return (
22
- useQuery ( sitePHPVersionQuery ( siteSlug ) ) . data ?? < span { ...getIsBlurredProps ( ) } > X.Y</ span >
22
+ useQuery ( sitePHPVersionQuery ( siteSlug ) ) . data ?? < span { ...IS_BLURRED_PROPS } > X.Y</ span >
23
23
) ;
24
24
}
25
25
@@ -130,20 +130,26 @@ function PlanDetails( { site }: { site: Site } ) {
130
130
</ >
131
131
) : (
132
132
< >
133
- < Text { ...getIsBlurredProps ( { enabled : ! currentPlan } ) } >
134
- { getPlanExpirationMessage (
135
- currentPlan ? currentPlan . expiry : new Date ( ) . toISOString ( )
136
- ) }
137
- </ Text >
138
- < Button
139
- { ...getIsBlurredProps ( { enabled : ! currentPlan } ) }
140
- href = {
141
- currentPlan ? `/purchases/subscriptions/${ site . slug } /${ currentPlan . id } ` : ''
142
- }
143
- variant = "link"
144
- >
145
- { __ ( 'Manage subscription' ) }
146
- </ Button >
133
+ { currentPlan ? (
134
+ < >
135
+ < Text > { getPlanExpirationMessage ( currentPlan . expiry ) } </ Text >
136
+ < Button
137
+ href = { `/purchases/subscriptions/${ site . slug } /${ currentPlan . id } ` }
138
+ variant = "link"
139
+ >
140
+ { __ ( 'Manage subscription' ) }
141
+ </ Button >
142
+ </ >
143
+ ) : (
144
+ < >
145
+ < Text { ...IS_BLURRED_PROPS } >
146
+ { getPlanExpirationMessage ( new Date ( ) . toISOString ( ) ) }
147
+ </ Text >
148
+ < Button { ...IS_BLURRED_PROPS } href = "" variant = "link" >
149
+ { __ ( 'Manage subscription' ) }
150
+ </ Button >
151
+ </ >
152
+ ) }
147
153
</ >
148
154
) }
149
155
</ VStack >
0 commit comments