File tree Expand file tree Collapse file tree
apps/payments/next/app/[locale]/[offeringId]/[interval] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 CheckoutParams ,
1414 SupportedPages ,
1515 getErrorFtlInfo ,
16+ buildPageMetadata ,
1617} from '@fxa/payments/ui/server' ;
1718import {
1819 getCartOrRedirectAction ,
@@ -21,7 +22,6 @@ import {
2122import { config } from 'apps/payments/next/config' ;
2223import type { Metadata } from 'next' ;
2324import { CartErrorReasonId } from '@fxa/shared/db/mysql/account' ;
24- import { buildPageMetadata } from '@fxa/payments/ui' ;
2525
2626// forces dynamic rendering
2727// https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
@@ -38,8 +38,6 @@ export async function generateMetadata(
3838) : Promise < Metadata > {
3939 return buildPageMetadata ( {
4040 params,
41- titlePrefix : 'Error' ,
42- description : 'There was an error processing your subscription. If this problem persists, please contact support.' ,
4341 page : 'error' ,
4442 pageType : 'checkout' ,
4543 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ import {
77 LoadingSpinner ,
88 StripeWrapper ,
99 PaymentInputHandler ,
10- buildPageMetadata ,
1110} from '@fxa/payments/ui' ;
12- import { getApp , SupportedPages } from '@fxa/payments/ui/server' ;
11+ import {
12+ getApp ,
13+ SupportedPages ,
14+ buildPageMetadata ,
15+ } from '@fxa/payments/ui/server' ;
1316import { headers } from 'next/headers' ;
1417import { getCartOrRedirectAction } from '@fxa/payments/ui/actions' ;
1518import type { Metadata } from 'next' ;
@@ -26,8 +29,6 @@ export async function generateMetadata(
2629) : Promise < Metadata > {
2730 return buildPageMetadata ( {
2831 params,
29- titlePrefix : 'Action required' ,
30- description : 'Please complete the required action to proceed with your payment.' ,
3132 page : 'needs_input' ,
3233 pageType : 'checkout' ,
3334 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change 66 PaymentStateObserver ,
77 CheckoutParams ,
88 LoadingSpinner ,
9- buildPageMetadata ,
109} from '@fxa/payments/ui' ;
11- import { getApp , SupportedPages } from '@fxa/payments/ui/server' ;
10+ import { getApp , SupportedPages , buildPageMetadata } from '@fxa/payments/ui/server' ;
1211import { headers } from 'next/headers' ;
1312import { validateCartStateAndRedirectAction } from '@fxa/payments/ui/actions' ;
1413import type { Metadata } from 'next' ;
@@ -25,8 +24,6 @@ export async function generateMetadata(
2524) : Promise < Metadata > {
2625 return buildPageMetadata ( {
2726 params,
28- titlePrefix : 'Processing' ,
29- description : 'Please wait while we finish processing your payment.' ,
3027 page : 'processing' ,
3128 pageType : 'checkout' ,
3229 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ import {
1111 ButtonVariant ,
1212 PaymentSection ,
1313 SignInForm ,
14- buildPageMetadata ,
1514} from '@fxa/payments/ui' ;
1615import {
1716 getApp ,
1817 SupportedPages ,
1918 CheckoutParams ,
2019 SignedIn ,
20+ buildPageMetadata ,
2121} from '@fxa/payments/ui/server' ;
2222import AppleLogo from '@fxa/shared/assets/images/apple-logo.svg' ;
2323import GoogleLogo from '@fxa/shared/assets/images/google-logo.svg' ;
@@ -40,10 +40,9 @@ export async function generateMetadata(
4040 searchParams : Record < string , string > | undefined ;
4141 } ,
4242) : Promise < Metadata > {
43+
4344 return buildPageMetadata ( {
4445 params,
45- titlePrefix : 'Checkout' ,
46- description : 'Enter your payment details to complete your purchase.' ,
4746 page : 'start' ,
4847 pageType : 'checkout' ,
4948 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import type { Metadata } from 'next';
66import { headers } from 'next/headers' ;
77import Image from 'next/image' ;
88import { auth } from 'apps/payments/next/auth' ;
9- import { getCardIcon , buildPageMetadata } from '@fxa/payments/ui' ;
9+ import { getCardIcon } from '@fxa/payments/ui' ;
1010import {
1111 fetchCMSData ,
1212 getCartOrRedirectAction ,
@@ -16,6 +16,7 @@ import {
1616 getApp ,
1717 CheckoutParams ,
1818 SupportedPages ,
19+ buildPageMetadata ,
1920} from '@fxa/payments/ui/server' ;
2021import { config } from 'apps/payments/next/config' ;
2122
@@ -32,8 +33,6 @@ export async function generateMetadata(
3233) : Promise < Metadata > {
3334 return buildPageMetadata ( {
3435 params,
35- titlePrefix : 'Success' ,
36- description : 'Congratulations! You have successfully completed your purchase.' ,
3736 page : 'success' ,
3837 pageType : 'checkout' ,
3938 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -12,14 +12,14 @@ import {
1212 CheckoutParams ,
1313 SupportedPages ,
1414 getErrorFtlInfo ,
15+ buildPageMetadata ,
1516} from '@fxa/payments/ui/server' ;
1617import {
1718 getCartOrRedirectAction ,
1819 recordEmitterEventAction ,
1920} from '@fxa/payments/ui/actions' ;
2021import { config } from 'apps/payments/next/config' ;
2122import { Metadata } from 'next' ;
22- import { buildPageMetadata } from '@fxa/payments/ui' ;
2323
2424// forces dynamic rendering
2525// https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
@@ -36,8 +36,6 @@ export async function generateMetadata(
3636) : Promise < Metadata > {
3737 return buildPageMetadata ( {
3838 params,
39- titlePrefix : 'Error' ,
40- description : 'There was an error processing your upgrade. If this problem persists, please contact support.' ,
4139 page : 'error' ,
4240 pageType : 'upgrade' ,
4341 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ import {
77 LoadingSpinner ,
88 StripeWrapper ,
99 PaymentInputHandler ,
10- buildPageMetadata ,
1110} from '@fxa/payments/ui' ;
12- import { getApp , SupportedPages } from '@fxa/payments/ui/server' ;
11+ import {
12+ getApp ,
13+ SupportedPages ,
14+ buildPageMetadata ,
15+ } from '@fxa/payments/ui/server' ;
1316import { headers } from 'next/headers' ;
1417import { getCartOrRedirectAction } from '@fxa/payments/ui/actions' ;
1518import { Metadata } from 'next' ;
@@ -26,8 +29,6 @@ export async function generateMetadata(
2629) : Promise < Metadata > {
2730 return buildPageMetadata ( {
2831 params,
29- titlePrefix : 'Action required' ,
30- description : 'Please complete the required action to proceed with your payment.' ,
3132 page : 'needs_input' ,
3233 pageType : 'upgrade' ,
3334 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ import {
66 PaymentStateObserver ,
77 CheckoutParams ,
88 LoadingSpinner ,
9- buildPageMetadata ,
109} from '@fxa/payments/ui' ;
11- import { getApp , SupportedPages } from '@fxa/payments/ui/server' ;
10+ import {
11+ getApp ,
12+ SupportedPages ,
13+ buildPageMetadata ,
14+ } from '@fxa/payments/ui/server' ;
1215import { headers } from 'next/headers' ;
1316import { validateCartStateAndRedirectAction } from '@fxa/payments/ui/actions' ;
1417import { Metadata } from 'next' ;
@@ -25,8 +28,6 @@ export async function generateMetadata(
2528) : Promise < Metadata > {
2629 return buildPageMetadata ( {
2730 params,
28- titlePrefix : 'Processing' ,
29- description : 'Please wait while we finish processing your payment.' ,
3031 page : 'processing' ,
3132 pageType : 'upgrade' ,
3233 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change 44
55import { headers } from 'next/headers' ;
66import { auth } from 'apps/payments/next/auth' ;
7- import { getCardIcon , buildPageMetadata } from '@fxa/payments/ui' ;
8- import { SupportedPages , getApp } from '@fxa/payments/ui/server' ;
7+ import { getCardIcon } from '@fxa/payments/ui' ;
8+ import {
9+ SupportedPages ,
10+ getApp ,
11+ buildPageMetadata ,
12+ } from '@fxa/payments/ui/server' ;
913import {
1014 fetchCMSData ,
1115 getCartOrRedirectAction ,
@@ -29,8 +33,6 @@ export async function generateMetadata(
2933) : Promise < Metadata > {
3034 return buildPageMetadata ( {
3135 params,
32- titlePrefix : 'Success' ,
33- description : 'Congratulations! You have successfully completed your upgrade.' ,
3436 page : 'success' ,
3537 pageType : 'upgrade' ,
3638 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import Image from 'next/image';
88import {
99 getCardIcon ,
1010 PaymentSection ,
11- buildPageMetadata ,
1211} from '@fxa/payments/ui' ;
1312import {
1413 fetchCMSData ,
@@ -18,6 +17,7 @@ import {
1817 getApp ,
1918 CheckoutParams ,
2019 SupportedPages ,
20+ buildPageMetadata ,
2121} from '@fxa/payments/ui/server' ;
2222import { Metadata } from 'next' ;
2323import { config } from 'apps/payments/next/config' ;
@@ -35,8 +35,6 @@ export async function generateMetadata(
3535) : Promise < Metadata > {
3636 return buildPageMetadata ( {
3737 params,
38- titlePrefix : 'Upgrade' ,
39- description : 'Enter your payment details to complete your upgrade.' ,
4038 page : 'start' ,
4139 pageType : 'upgrade' ,
4240 acceptLanguage : headers ( ) . get ( 'accept-language' ) ,
You can’t perform that action at this time.
0 commit comments