feat: introduce fallback for title value in the BillingCard

This commit is contained in:
kasia.oczkowska
2024-10-30 12:45:24 +00:00
parent 4023a6d1cc
commit b59807d221

View File

@@ -44,7 +44,7 @@ function BillingCard(props) {
</Typography> </Typography>
<Typography variant="h6" fontWeight="bold"> <Typography variant="h6" fontWeight="bold">
{title} {title || '---'}
</Typography> </Typography>
</CardContent> </CardContent>
@@ -119,12 +119,12 @@ export default function UsageDataInformation() {
text: 'Upgrade plan', text: 'Upgrade plan',
}, },
nextBillAmount: { nextBillAmount: {
title: '---', title: null,
action: null, action: null,
text: null, text: null,
}, },
nextBillDate: { nextBillDate: {
title: '---', title: null,
action: null, action: null,
text: null, text: null,
}, },
@@ -137,7 +137,9 @@ export default function UsageDataInformation() {
text: formatMessage('usageDataInformation.cancelPlan'), text: formatMessage('usageDataInformation.cancelPlan'),
}, },
nextBillAmount: { nextBillAmount: {
title: `${subscription?.nextBillAmount}`, title: subscription?.nextBillAmount
? `${subscription?.nextBillAmount}`
: null,
action: subscription?.updateUrl, action: subscription?.updateUrl,
text: formatMessage('usageDataInformation.updatePaymentMethod'), text: formatMessage('usageDataInformation.updatePaymentMethod'),
}, },