diff --git a/.changeset/clear-trains-rhyme.md b/.changeset/clear-trains-rhyme.md new file mode 100644 index 00000000000..d60d7baae9a --- /dev/null +++ b/.changeset/clear-trains-rhyme.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +For each plan inside the `` display "Switch to this plan" instead of "Get started" when a subscription already exists. diff --git a/packages/clerk-js/src/ui/components/Subscriptions/SubscriptionsList.tsx b/packages/clerk-js/src/ui/components/Subscriptions/SubscriptionsList.tsx index 1d774f12bcb..fe3f5e0e2d6 100644 --- a/packages/clerk-js/src/ui/components/Subscriptions/SubscriptionsList.tsx +++ b/packages/clerk-js/src/ui/components/Subscriptions/SubscriptionsList.tsx @@ -4,7 +4,7 @@ import { usePlansContext } from '../../contexts'; import { Badge, Box, Button, localizationKeys, Span, Table, Tbody, Td, Text, Th, Thead, Tr } from '../../customizables'; export function SubscriptionsList() { - const { subscriptions, handleSelectPlan, buttonPropsForPlan } = usePlansContext(); + const { subscriptions, handleSelectPlan, buttonPropsForPlan, shouldDisplayPlanButton } = usePlansContext(); const handleSelectSubscription = (subscription: __experimental_CommerceSubscriptionResource) => { handleSelectPlan({ @@ -68,12 +68,14 @@ export function SubscriptionsList() { textAlign: 'right', })} > -