Skip to content

Commit f0d603e

Browse files
authored
Allow siteless purchases to load in hosting dashboard (#106559)
1 parent 3a9386d commit f0d603e

File tree

1 file changed

+10
-8
lines changed
  • client/dashboard/me/billing-purchases/purchase-settings

1 file changed

+10
-8
lines changed

client/dashboard/me/billing-purchases/purchase-settings/index.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ export default function PurchaseSettings() {
10581058
} );
10591059
const formattedExpiry = useFormattedTime( purchase?.expiry_date ?? '' );
10601060
const formattedRenewal = useFormattedTime( purchase?.renew_date ?? '' );
1061-
if ( ! purchase || ! site ) {
1061+
if ( ! purchase ) {
10621062
return null;
10631063
}
10641064
const upgradeUrl = getUpgradeUrl( purchase );
@@ -1141,13 +1141,15 @@ export default function PurchaseSettings() {
11411141
<PurchasePriceCard purchase={ purchase } />
11421142
</HStack>
11431143
<HStack spacing={ 6 } justify="flex-start" alignment="center">
1144-
<PurchaseSettingsCard
1145-
icon={ siteLogo }
1146-
title={ __( 'Site' ) }
1147-
heading={ site.name }
1148-
description={ purchase.site_slug }
1149-
link={ `/v2/sites/${ purchase.site_slug }` }
1150-
/>
1144+
{ site && (
1145+
<PurchaseSettingsCard
1146+
icon={ siteLogo }
1147+
title={ __( 'Site' ) }
1148+
heading={ site.name }
1149+
description={ purchase.site_slug }
1150+
link={ `/v2/sites/${ purchase.site_slug }` }
1151+
/>
1152+
) }
11511153
<PurchaseSettingsCard
11521154
icon={ commentAuthorAvatar }
11531155
title={ __( 'Owner' ) }

0 commit comments

Comments
 (0)