diff --git a/src/components/Billing/UpgradeAccountModal.tsx b/src/components/Billing/UpgradeAccountModal.tsx index 63dda64d9..4192bf63f 100644 --- a/src/components/Billing/UpgradeAccountModal.tsx +++ b/src/components/Billing/UpgradeAccountModal.tsx @@ -120,10 +120,11 @@ export function UpgradeAccountModal(props: UpgradeAccountModalProps) { queryClient, ); + const isCanceled = userBillingDetails?.status === 'canceled'; const selectedPlanDetails = USER_SUBSCRIPTION_PLAN_PRICES.find( (plan) => plan.interval === selectedPlan, ); - const currentPlanPriceId = userBillingDetails?.priceId; + const currentPlanPriceId = isCanceled ? null : userBillingDetails?.priceId; const currentPlan = USER_SUBSCRIPTION_PLAN_PRICES.find( (plan) => plan.priceId === currentPlanPriceId, ); @@ -202,9 +203,8 @@ export function UpgradeAccountModal(props: UpgradeAccountModalProps) {
{USER_SUBSCRIPTION_PLAN_PRICES.map((plan) => { - const isCanceled = userBillingDetails?.status === 'canceled'; const isCurrentPlanSelected = - currentPlan?.priceId === plan.priceId && !isCanceled; + currentPlan?.priceId === plan.priceId; const isYearly = plan.interval === 'year'; return (