Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/payments/next/.env
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CURRENCY_CONFIG__CURRENCIES_TO_COUNTRIES={"USD":["AS","CA","GB","GU","MP","MY","

# Churn Intervention Config
CHURN_INTERVENTION_CONFIG__COLLECTION_NAME=churnInterventions
CHURN_INTERVENTION_CONFIG__ENABLED=false
CHURN_INTERVENTION_CONFIG__ENABLED=true

# StatsD Config
STATS_D_CONFIG__SAMPLE_RATE=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ export default async function InterstitialOfferErrorPage({
const uid = session.user.id;

let interstitialOfferContent;
try {
try {
interstitialOfferContent = await getInterstitialOfferContentAction(
uid,
subscriptionId,
acceptLanguage,
locale
uid,
subscriptionId,
acceptLanguage,
locale
);
} catch (error) {
} catch (error) {
notFound();
}
}

if (!interstitialOfferContent) {
notFound();
Expand All @@ -59,7 +59,7 @@ export default async function InterstitialOfferErrorPage({
redirect(`/${locale}/subscriptions/${subscriptionId}/offer`);
}

const { webIcon, productName} = interstitialOfferContent;
const { webIcon, productName } = interstitialOfferContent;
const reason = interstitialOfferContent.reason ?? 'general_error';

if (webIcon && !productName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,56 +94,58 @@ export default async function InterstitialOfferPage({

const { ftlId, fallbackText } = getKeepCurrentSubscriptionFtlIds(currentInterval);
const keepCurrentSubscriptionButtonText = l10n.getString(ftlId, fallbackText);
const searchParamsObj = new URLSearchParams(searchParams);
searchParamsObj.append('entrypoint', 'subscription-management');

return (
<section
className="flex justify-center min-h-[calc(100vh_-_4rem)] tablet:items-center tablet:min-h-[calc(100vh_-_5rem)]"
>
<div className="w-full max-w-[480px] flex flex-col justify-center items-center p-10 tablet:bg-white tablet:rounded-xl tablet:border tablet:border-grey-200 tablet:shadow-[0_0_16px_0_rgba(0,0,0,0.08)]">
<div className="w-full flex flex-col items-center gap-6 text-center">
<Image
src={webIcon}
alt={productName}
height={64}
width={64}
/>
<h1 className="font-bold self-stretch text-center font-header text-xl leading-8 ">
{modalHeading1}
</h1>
</div>
<p className="w-full self-stretch leading-7 text-lg text-grey-900">
{modalMessage &&
modalMessage.map((line, i) => (
<p className="my-2" key={i}>
{line}
</p>
))}
</p>
<div className="w-full max-w-[480px] flex flex-col justify-center items-center p-10 tablet:bg-white tablet:rounded-xl tablet:border tablet:border-grey-200 tablet:shadow-[0_0_16px_0_rgba(0,0,0,0.08)]">
<div className="w-full flex flex-col items-center gap-6 text-center">
<Image
src={webIcon}
alt={productName}
height={64}
width={64}
/>
<h1 className="font-bold self-stretch text-center font-header text-xl leading-8 ">
{modalHeading1}
</h1>
</div>
<p className="w-full self-stretch leading-7 text-lg text-grey-900">
{modalMessage &&
modalMessage.map((line, i) => (
<p className="my-2" key={i}>
{line}
</p>
))}
</p>

<div className="w-full flex flex-col gap-3 mt-12">
<Link
className="border box-border font-header h-14 items-center justify-center rounded-md text-white text-center font-bold py-4 px-6 bg-blue-500 hover:bg-blue-700 flex w-full"
href={upgradeButtonUrl}
>
{upgradeButtonLabel}
</Link>
<Link
className="border box-border font-header h-14 items-center justify-center rounded-md text-center font-bold py-4 px-6 bg-grey-10 border-grey-200 hover:bg-grey-50 flex w-full"
href={`/${locale}/subscriptions/landing`}
>
<span>{keepCurrentSubscriptionButtonText}</span>
</Link>
<Link
className="border box-border font-header h-14 items-center justify-center rounded-md text-center font-bold py-4 px-6 bg-grey-10 border-grey-200 hover:bg-grey-50 flex w-full"
href={`/${locale}/subscriptions/${subscriptionId}/cancel`}
>
<span>{l10n.getString(
'interstitial-offer-button-cancel-subscription',
'Continue to cancel'
)}</span>
</Link>
</div>
<div className="w-full flex flex-col gap-3 mt-12">
<Link
className="border box-border font-header h-14 items-center justify-center rounded-md text-white text-center font-bold py-4 px-6 bg-blue-500 hover:bg-blue-700 flex w-full"
href={`${upgradeButtonUrl}?${searchParamsObj.toString()}`}
>
{upgradeButtonLabel}
</Link>
<Link
className="border box-border font-header h-14 items-center justify-center rounded-md text-center font-bold py-4 px-6 bg-grey-10 border-grey-200 hover:bg-grey-50 flex w-full"
href={`/${locale}/subscriptions/landing`}
>
<span>{keepCurrentSubscriptionButtonText}</span>
</Link>
<Link
className="border box-border font-header h-14 items-center justify-center rounded-md text-center font-bold py-4 px-6 bg-grey-10 border-grey-200 hover:bg-grey-50 flex w-full"
href={`/${locale}/subscriptions/${subscriptionId}/cancel`}
>
<span>{l10n.getString(
'interstitial-offer-button-cancel-subscription',
'Continue to cancel'
)}</span>
</Link>
</div>
</div>
</section>
);
}
Loading
Loading