diff --git a/src/ui/pages/plans.tsx b/src/ui/pages/plans.tsx index c865a4476..a575cb523 100644 --- a/src/ui/pages/plans.tsx +++ b/src/ui/pages/plans.tsx @@ -4,6 +4,7 @@ import { fetchPlans, selectFirstActivePlan, selectPlanByActiveId, + selectStacksByOrgAsList, updateActivePlan, } from "@app/deploy"; import { selectOrganizationSelected } from "@app/organizations"; @@ -37,6 +38,10 @@ export const PlansPage = () => { const hasPaymentMethod = useSelector(selectHasPaymentMethod); const paymentRequired = hasTrialNoPayment || !hasPaymentMethod; + const stacks = useSelector(selectStacksByOrgAsList); + const hasDedicatedStack = stacks.filter((s) => s.organizationId).length > 0; + const legacy = hasDedicatedStack && !activePlan.planId; + const onSelectPlan = ({ planId, name }: { planId: string; name: string }) => { dispatch( updateActivePlan({ @@ -74,14 +79,24 @@ export const PlansPage = () => { before changing your plan. ) : null} + {legacy ? ( + + You are currently on an older plan with Aptible. Please{" "} + contact us to update + your plan or{" "} + view new plans. + + ) : null} - + {legacy ? null : ( + + )} );