@@ -11,15 +11,17 @@ 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_CLASS_NAME } 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 ?? (
23
+ < span className = { IS_BLURRED_CLASS_NAME } > X.Y</ span >
24
+ )
23
25
) ;
24
26
}
25
27
@@ -130,20 +132,27 @@ function PlanDetails( { site }: { site: Site } ) {
130
132
</ >
131
133
) : (
132
134
< >
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 >
135
+ { currentPlan ? (
136
+ < >
137
+ < Text > { getPlanExpirationMessage ( currentPlan . expiry ) } </ Text >
138
+ < Button
139
+ href = { `/purchases/subscriptions/${ site . slug } /${ currentPlan . id } ` }
140
+ variant = "link"
141
+ >
142
+ { __ ( 'Manage subscription' ) }
143
+ </ Button >
144
+ </ >
145
+ ) : (
146
+ < >
147
+ < Text className = { IS_BLURRED_CLASS_NAME } >
148
+ { getPlanExpirationMessage ( new Date ( ) . toISOString ( ) ) }
149
+ </ Text >
150
+ { /* @ts -expect-error inert is not typed */ }
151
+ < Button inert className = { IS_BLURRED_CLASS_NAME } href = "" variant = "link" >
152
+ { __ ( 'Manage subscription' ) }
153
+ </ Button >
154
+ </ >
155
+ ) }
147
156
</ >
148
157
) }
149
158
</ VStack >
0 commit comments