diff --git a/clients/apps/web/src/components/Subscriptions/CustomerChangePlanModal.tsx b/clients/apps/web/src/components/Subscriptions/CustomerChangePlanModal.tsx index 4bfcea7fad..a98d50ecd1 100644 --- a/clients/apps/web/src/components/Subscriptions/CustomerChangePlanModal.tsx +++ b/clients/apps/web/src/components/Subscriptions/CustomerChangePlanModal.tsx @@ -10,7 +10,8 @@ import { Client, schemas, unwrap } from '@polar-sh/client' import Button from '@polar-sh/ui/components/atoms/Button' import { List, ListItem } from '@polar-sh/ui/components/atoms/List' import { ThemingPresetProps } from '@polar-sh/ui/hooks/theming' -import { useRouter } from 'next/navigation' +import Link from 'next/link' +import { useRouter, useSearchParams } from 'next/navigation' import { useCallback, useMemo, useState } from 'react' import { twMerge } from 'tailwind-merge' import { resolveBenefitIcon } from '../Benefit/utils' @@ -65,6 +66,9 @@ const CustomerChangePlanModal = ({ themingPreset: ThemingPresetProps }) => { const router = useRouter() + const searchParams = useSearchParams() + const settingsPath = `/${organization.slug}/portal/settings?${searchParams.toString()}` + const products = useMemo( () => _products.filter((p) => p.is_recurring && !hasLegacyRecurringPrices(p)), @@ -256,10 +260,28 @@ const CustomerChangePlanModal = ({ )} {needToAddPaymentMethod && ( -

- You need to add a payment method before updating your plan. Head to - the Customer Portal Settings to add a payment method. -

+
+
+ + + + +
+

+ You need to add a payment method before updating your plan. Head + to the  + + Customer Portal Settings + +   to add a payment method. +

+
)}