@@ -22,7 +22,10 @@ import {
22
22
getMainPlan ,
23
23
MDA_TEST_USER_HEADER ,
24
24
} from '../../../../../shared/productResponse' ;
25
- import type { ProductTypeWithCancellationFlow } from '../../../../../shared/productTypes' ;
25
+ import {
26
+ GROUPED_PRODUCT_TYPES ,
27
+ type ProductTypeWithCancellationFlow ,
28
+ } from '../../../../../shared/productTypes' ;
26
29
import {
27
30
buttonCentredCss ,
28
31
stackedButtonLayoutCss ,
@@ -100,7 +103,11 @@ const ReasonSelection = ({
100
103
` }
101
104
>
102
105
< legend css = { reasonLegendCss } >
103
- Why did you cancel your { productType . friendlyName ( ) } today?
106
+ Why did you cancel your{ ' ' }
107
+ { GROUPED_PRODUCT_TYPES [
108
+ productType . groupedProductType
109
+ ] . friendlyName ( ) } { ' ' }
110
+ today?
104
111
</ legend >
105
112
< RadioGroup
106
113
name = "issue_type"
@@ -202,12 +209,14 @@ export const SelectReason = () => {
202
209
mainPlan . chargedThrough ?? undefined ,
203
210
) . dateStr ( DATE_FNS_LONG_OUTPUT_FORMAT ) ;
204
211
212
+ const navigateToReminder = productType . productType === 'membership' ;
213
+
205
214
const submitReason = async ( ) => {
206
215
{
207
216
const canContinue = ! ! selectedReasonId . length ;
208
217
if ( canContinue ) {
209
218
await postReason ( ) ;
210
- navigate ( '../reminder' , {
219
+ navigate ( navigateToReminder ? '../reminder' : './ ', {
211
220
state : {
212
221
selectedReasonId,
213
222
} ,
@@ -254,7 +263,11 @@ export const SelectReason = () => {
254
263
return (
255
264
< section css = { sectionSpacing } >
256
265
< h2 css = { headingCss } >
257
- Your { productType . friendlyName ( ) } has been cancelled
266
+ Your{ ' ' }
267
+ { GROUPED_PRODUCT_TYPES [
268
+ productType . groupedProductType
269
+ ] . friendlyName ( ) } { ' ' }
270
+ has been cancelled
258
271
</ h2 >
259
272
< CancellationInfo
260
273
userEmailAddress = { userEmailAddress }
0 commit comments