@@ -104,12 +104,6 @@ export const SubscriptionContent = ({
104104 locale
105105 ) ;
106106
107- const spanElementBilledOnCurrentInvoiceDate = (
108- < span className = "font-normal text-grey-600 text-sm" >
109- billed on { currentInvoiceDateLongFallback }
110- </ span >
111- ) ;
112-
113107 async function cancelSubscriptionAtPeriodEnd ( ) {
114108 const result = await cancelSubscriptionAtPeriodEndAction (
115109 userId ,
@@ -530,109 +524,130 @@ export const SubscriptionContent = ({
530524 </ >
531525 ) : (
532526 < >
533- < div className = "leading-5" >
534- { currentInvoiceTax ? (
535- < Localized
536- id = "subscription-content-current-invoice-billed-on-with-tax"
537- vars = { {
538- billedOnDate : currentInvoiceDateLongFallback ,
539- invoiceTotal :
540- getCurrencyFallbackText ( currentInvoiceTotal ) ,
541- taxDue : getCurrencyFallbackText ( currentInvoiceTax ) ,
542- } }
543- elems = { { span : spanElementBilledOnCurrentInvoiceDate } }
544- >
545- < p className = "text-base font-semibold" >
546- { getCurrencyFallbackText ( currentInvoiceTotal ) } +{ ' ' }
547- { getCurrencyFallbackText ( currentInvoiceTax ) } tax{ ' ' }
548- { spanElementBilledOnCurrentInvoiceDate }
549- </ p >
550- </ Localized >
551- ) : (
552- < Localized
553- id = "subscription-content-current-invoice-billed-on-no-tax"
554- vars = { {
555- billedOnDate : currentInvoiceDateLongFallback ,
556- invoiceTotal :
557- getCurrencyFallbackText ( currentInvoiceTotal ) ,
558- } }
559- elems = { { span : spanElementBilledOnCurrentInvoiceDate } }
560- >
561- < p className = "text-base font-semibold" >
562- { getCurrencyFallbackText ( currentInvoiceTotal ) } { ' ' }
563- { spanElementBilledOnCurrentInvoiceDate }
564- </ p >
565- </ Localized >
566- ) }
567- { creditApplied && creditApplied > 0 ? (
568- < Localized
569- id = "subscription-content-credit-issued-to-your-account"
570- vars = { {
571- creditApplied : getCurrencyFallbackText ( creditApplied ) ,
572- } }
573- >
574- < p className = "text-green-900 text-sm" >
575- < strong > { getCurrencyFallbackText ( creditApplied ) } </ strong > { ' ' }
576- credit issued to your account
577- </ p >
578- </ Localized >
579- ) : null }
580- { promotionName && (
581- < Localized
582- id = "subscription-content-coupon-applied"
583- vars = { {
584- promotionName,
585- } }
586- >
587- < p className = "font-bold text-sm text-violet-700" >
588- { promotionName } applied
589- </ p >
590- </ Localized >
591- ) }
592- { nextInvoiceTotal !== undefined && nextInvoiceTotal >= 0 ? (
593- < div className = "text-sm" >
594- { nextInvoiceTax ? (
595- < Localized
596- id = "subscription-content-next-bill-excl-discount-with-tax"
597- vars = { {
598- nextBillDate : currentPeriodEndLongFallback ,
599- nextInvoiceTotal :
600- getCurrencyFallbackText ( nextInvoiceTotal ) ,
601- taxDue : getCurrencyFallbackText ( nextInvoiceTax ) ,
602- } }
603- >
604- < p >
605- Next bill of{ ' ' }
606- < strong >
607- { getCurrencyFallbackText ( nextInvoiceTotal ) } +{ ' ' }
608- { getCurrencyFallbackText ( nextInvoiceTax ) } tax
609- </ strong >
610- , excluding discounts, is due{ ' ' }
611- < strong > { currentPeriodEndLongFallback } </ strong >
612- </ p >
613- </ Localized >
614- ) : (
615- < Localized
616- id = "subscription-content-next-bill-excl-discount-no-tax"
617- vars = { {
618- nextBillDate : currentPeriodEndLongFallback ,
619- nextInvoiceTotal :
620- getCurrencyFallbackText ( nextInvoiceTotal ) ,
621- } }
622- >
623- < p >
624- Next bill of{ ' ' }
625- < strong >
626- { getCurrencyFallbackText ( nextInvoiceTotal ) }
627- </ strong >
628- , excluding discounts, is due{ ' ' }
629- < strong > { currentPeriodEndLongFallback } </ strong >
630- </ p >
631- </ Localized >
632- ) }
633- </ div >
634- ) : null }
635- </ div >
527+ { isClient && (
528+ < div className = "leading-5" >
529+ { currentInvoiceTax ? (
530+ < Localized
531+ id = "subscription-content-current-billed-on-tax"
532+ vars = { {
533+ billedOnDate : currentInvoiceDateLongFallback ,
534+ invoiceTotal :
535+ getCurrencyFallbackText ( currentInvoiceTotal ) ,
536+ taxDue : getCurrencyFallbackText ( currentInvoiceTax ) ,
537+ } }
538+ elems = { {
539+ strong : < strong > </ strong > ,
540+ span : < span className = "text-grey-600 text-sm" > </ span > ,
541+ } }
542+ >
543+ < p >
544+ < strong >
545+ { getCurrencyFallbackText ( currentInvoiceTotal ) } +{ ' ' }
546+ { getCurrencyFallbackText ( currentInvoiceTax ) } tax{ ' ' }
547+ </ strong >
548+ < span className = "text-grey-600 text-sm" >
549+ billed on { currentInvoiceDateLongFallback }
550+ </ span >
551+ </ p >
552+ </ Localized >
553+ ) : (
554+ < Localized
555+ id = "subscription-content-current-billed-on-no-tax"
556+ vars = { {
557+ billedOnDate : currentInvoiceDateLongFallback ,
558+ invoiceTotal :
559+ getCurrencyFallbackText ( currentInvoiceTotal ) ,
560+ } }
561+ elems = { {
562+ strong : < strong > </ strong > ,
563+ span : < span className = "text-grey-600 text-sm" > </ span > ,
564+ } }
565+ >
566+ < p >
567+ < strong >
568+ { getCurrencyFallbackText ( currentInvoiceTotal ) }
569+ </ strong >
570+ < span className = "text-grey-600 text-sm" >
571+ billed on { currentInvoiceDateLongFallback }
572+ </ span >
573+ </ p >
574+ </ Localized >
575+ ) }
576+ { creditApplied && creditApplied > 0 ? (
577+ < Localized
578+ id = "subscription-content-credit-issued-to-your-account"
579+ vars = { {
580+ creditApplied : getCurrencyFallbackText ( creditApplied ) ,
581+ } }
582+ elems = { { strong : < strong > </ strong > } }
583+ >
584+ < p className = "text-green-900 text-sm" >
585+ < strong >
586+ { getCurrencyFallbackText ( creditApplied ) }
587+ </ strong > { ' ' }
588+ credit issued to your account
589+ </ p >
590+ </ Localized >
591+ ) : null }
592+ { promotionName && (
593+ < Localized
594+ id = "subscription-content-coupon-applied"
595+ vars = { {
596+ promotionName,
597+ } }
598+ >
599+ < p className = "font-bold text-sm text-violet-700" >
600+ { promotionName } applied
601+ </ p >
602+ </ Localized >
603+ ) }
604+ { nextInvoiceTotal !== undefined && nextInvoiceTotal >= 0 ? (
605+ < div className = "text-sm" >
606+ { nextInvoiceTax ? (
607+ < Localized
608+ id = "subscription-content-next-bill-excl-disc-with-tax"
609+ vars = { {
610+ nextBillDate : currentPeriodEndLongFallback ,
611+ nextInvoiceTotal :
612+ getCurrencyFallbackText ( nextInvoiceTotal ) ,
613+ taxDue : getCurrencyFallbackText ( nextInvoiceTax ) ,
614+ } }
615+ elems = { { strong : < strong > </ strong > } }
616+ >
617+ < p >
618+ Next bill of{ ' ' }
619+ < strong >
620+ { getCurrencyFallbackText ( nextInvoiceTotal ) } +{ ' ' }
621+ { getCurrencyFallbackText ( nextInvoiceTax ) } tax
622+ </ strong >
623+ , excluding discounts, is due{ ' ' }
624+ < strong > { currentPeriodEndLongFallback } </ strong >
625+ </ p >
626+ </ Localized >
627+ ) : (
628+ < Localized
629+ id = "subscription-content-next-bill-excl-no-tax"
630+ vars = { {
631+ nextBillDate : currentPeriodEndLongFallback ,
632+ nextInvoiceTotal :
633+ getCurrencyFallbackText ( nextInvoiceTotal ) ,
634+ } }
635+ elems = { { strong : < strong > </ strong > } }
636+ >
637+ < p >
638+ Next bill of{ ' ' }
639+ < strong >
640+ { getCurrencyFallbackText ( nextInvoiceTotal ) }
641+ </ strong >
642+ , excluding discounts, is due{ ' ' }
643+ < strong > { currentPeriodEndLongFallback } </ strong >
644+ </ p >
645+ </ Localized >
646+ ) }
647+ </ div >
648+ ) : null }
649+ </ div >
650+ ) }
636651 < Localized
637652 id = "subscription-content-button-cancel"
638653 vars = { { productName } }
0 commit comments