File tree 4 files changed +79
-33
lines changed
components/mma/accountoverview
4 files changed +79
-33
lines changed Original file line number Diff line number Diff line change @@ -382,13 +382,14 @@ const InnerContent = ({
382
382
/>
383
383
) }
384
384
385
- { ! hasCancellationPending && (
386
- < CancellationCTA
387
- productDetail = { productDetail }
388
- friendlyName = { groupedProductType . friendlyName }
389
- specificProductType = { specificProductType }
390
- />
391
- ) }
385
+ { ! hasCancellationPending &&
386
+ productDetail . billingCountry !== 'United States' && (
387
+ < CancellationCTA
388
+ productDetail = { productDetail }
389
+ friendlyName = { groupedProductType . friendlyName }
390
+ specificProductType = { specificProductType }
391
+ />
392
+ ) }
392
393
</ >
393
394
) ;
394
395
} ;
Original file line number Diff line number Diff line change @@ -566,6 +566,54 @@ export const ProductCard = ({
566
566
</ p >
567
567
</ Card . Section >
568
568
) }
569
+ { productDetail . billingCountry === 'United States' &&
570
+ ! hasCancellationPending && (
571
+ < Card . Section >
572
+ < div css = { productDetailLayoutCss } >
573
+ < div >
574
+ < h4 css = { sectionHeadingCss } >
575
+ Cancel { groupedProductType . friendlyName }
576
+ </ h4 >
577
+ < p
578
+ css = { css `
579
+ max- width: 350px;
580
+ ` }
581
+ >
582
+ Stop your recurring payment, at the end
583
+ of current billing period.
584
+ </ p >
585
+ </ div >
586
+ < div css = { wideButtonLayoutCss } >
587
+ < Button
588
+ aria-label = { `Cancel ${ specificProductType . productTitle (
589
+ mainPlan ,
590
+ ) } `}
591
+ size = "small"
592
+ cssOverrides = { css `
593
+ justify- content: center;
594
+ ` }
595
+ priority = "primary"
596
+ onClick = { ( ) => {
597
+ trackEvent ( {
598
+ eventCategory :
599
+ 'account_overview' ,
600
+ eventAction : 'click' ,
601
+ eventLabel : 'cancel_product' ,
602
+ } ) ;
603
+ navigate (
604
+ `/cancel/${ specificProductType . urlPart } ` ,
605
+ {
606
+ state : { productDetail } ,
607
+ } ,
608
+ ) ;
609
+ } }
610
+ >
611
+ Cancel { groupedProductType . friendlyName }
612
+ </ Button >
613
+ </ div >
614
+ </ div >
615
+ </ Card . Section >
616
+ ) }
569
617
</ Card >
570
618
</ Stack >
571
619
) ;
Original file line number Diff line number Diff line change @@ -248,32 +248,29 @@ const InnerContent = ({
248
248
</ LinkButton >
249
249
) }
250
250
251
- < div
252
- css = { css `
253
- margin- left: ${ space [ 5 ] } px;
254
- ` }
255
- >
256
- { ! hasCancellationPending &&
257
- isSelfServeCancellationAllowed && (
258
- < Button
259
- priority = "subdued"
260
- onClick = { ( ) => {
261
- navigate (
262
- '/cancel/' +
263
- specificProductType . urlPart ,
264
- {
265
- state : {
266
- productDetail :
267
- productDetail ,
268
- } ,
251
+ { ! hasCancellationPending &&
252
+ isSelfServeCancellationAllowed &&
253
+ productDetail . billingCountry !== 'United States' && (
254
+ < Button
255
+ priority = "subdued"
256
+ onClick = { ( ) => {
257
+ navigate (
258
+ '/cancel/' +
259
+ specificProductType . urlPart ,
260
+ {
261
+ state : {
262
+ productDetail : productDetail ,
269
263
} ,
270
- ) ;
271
- } }
272
- >
273
- Cancel { groupedProductType . friendlyName }
274
- </ Button >
275
- ) }
276
- </ div >
264
+ } ,
265
+ ) ;
266
+ } }
267
+ cssOverrides = { css `
268
+ margin- left: ${ space [ 5 ] } px;
269
+ ` }
270
+ >
271
+ Cancel { groupedProductType . friendlyName }
272
+ </ Button >
273
+ ) }
277
274
</ div >
278
275
</ section >
279
276
</ >
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export const wideButtonCss = css`
85
85
export const wideButtonLayoutCss = css `
86
86
display : flex;
87
87
flex-direction : column;
88
- justify-content : flex-end ;
88
+ justify-content : flex-start ;
89
89
90
90
> * + * {
91
91
margin-top : ${ space [ 3 ] } px;
You can’t perform that action at this time.
0 commit comments