fix: update isNewOrg logic on apply-credit page

The logic was for an existing org, but the variable name was isNewOrg. This commit updates the logic to match the variable name.
This commit is contained in:
Steven Nguyen
2025-06-05 17:14:46 -07:00
parent ecaacff737
commit bc0baac9bc
@@ -246,14 +246,12 @@
billingPlan = getBillingPlan();
}
$: isNewOrg = selectedOrgId && selectedOrgId !== newOrgId;
$: isNewOrg = !(selectedOrgId && selectedOrgId !== newOrgId);
$: {
if (isNewOrg) {
(async () => {
currentPlan = await sdk.forConsole.billing.getOrganizationPlan(selectedOrgId);
})();
}
$: if (!isNewOrg) {
(async () => {
currentPlan = await sdk.forConsole.billing.getOrganizationPlan(selectedOrgId);
})();
}
// after adding a payment method, fetch the payment methods again so the input can be updated
@@ -371,7 +369,7 @@
{collaborators}
bind:couponData
bind:billingBudget
organizationId={isNewOrg ? selectedOrgId : null}>
organizationId={!isNewOrg ? selectedOrgId : null}>
{#if campaign?.template === 'review' && (campaign?.cta || campaign?.claimed || campaign?.unclaimed)}
<div class="u-margin-block-end-24">
<p class="body-text-1 u-bold">{campaign?.cta}</p>