-
Notifications
You must be signed in to change notification settings - Fork 219
feat(payments-next): Cancellation flow: Create page - Interstitial Offer #19859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
8bf0325 to
fb7e902
Compare
ec5a467 to
b54e666
Compare
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
e898c7d to
35baab7
Compare
4fb6ac4 to
c162981
Compare
apps/payments/next/app/[locale]/subscriptions/[subscriptionId]/offer/page.tsx
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| if (!interstitialOfferContent.isEligible || !interstitialOfferContent.pageContent) { | ||
| redirect(`/${locale}/subscriptions/${subscriptionId}/offer/error`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/${locale}/subscriptions/${subscriptionId}/offer/error
a1858cf to
2f5e37b
Compare
libs/payments/ui/src/lib/nestapp/validators/GetInterstitialOfferContentActionResult.ts
Show resolved
Hide resolved
2f5e37b to
c6b045d
Compare
| redirect(`/${locale}/subscriptions/${subscriptionId}/offer`); | ||
| } | ||
|
|
||
| const { reason, webIcon, productName} = interstitialOfferContent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const { webIcon, productName } = interstitialOfferContent;
const reason = interstitialOfferContent.reason ?? 'general_error';
if (webIcon && !productName) {
throw new Error('Missing productName for interstitial offer icon');
}
|
|
||
| const { reason, webIcon, productName} = interstitialOfferContent; | ||
|
|
||
| if (!reason || !webIcon || !productName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed with the suggestion above.
| 'It looks like this subscription may no longer be active.' | ||
| ), | ||
| }; | ||
| case 'current_interval_not_found': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We don't need to list all the cases - if it's not subscription_not_found, it will just use the default option
| {webIcon && ( | ||
| <Image | ||
| src={webIcon} | ||
| alt={productName} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alt={productName ?? ''} as productName can be optional
c6b045d to
ee820ad
Compare
| > | ||
| {heading} | ||
| </h1> | ||
| <p className="w-full self-stretch leading-7 text-lg text-grey-900 text-center tablet:text-left"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tablet:text-left -> tablet:text-start perhaps?
In cases where the language direction is rtl, and not ltr.
Because: * We need a cancel interstitial offer page as part of the churn intervention epic. This commit: * Creates /[locale]/subscriptions/[subscription_id]/offer page Closes #PAY-3371
ee820ad to
c6d567f
Compare
Because
This pull request
Issue that this pull request solves
Closes: #PAY-3371
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)
Any other information that is important to this pull request.