diff --git a/src/routes/(console)/apply-credit/+page.svelte b/src/routes/(console)/apply-credit/+page.svelte index 9bc53d5cb..df8a16bf9 100644 --- a/src/routes/(console)/apply-credit/+page.svelte +++ b/src/routes/(console)/apply-credit/+page.svelte @@ -190,17 +190,11 @@ (team) => team.$id === selectedOrgId ) as Organization; - function getNewBillingPlan(organization: Organization): BillingPlan { - if (organization?.billingPlan === BillingPlan.SCALE) { - return BillingPlan.SCALE; - } else if (campaign?.plan) { - return campaign.plan; - } else { - return BillingPlan.PRO; - } + $: if (selectedOrg?.billingPlan === BillingPlan.SCALE) { + billingPlan = BillingPlan.SCALE; + } else if (campaign?.plan) { + billingPlan = campaign.plan; } - - $: billingPlan = getNewBillingPlan(selectedOrg);