Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: top-up loading state and show plan item on downgrade (#45430)

Ignacio Dobronichcf9d88700d97
diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/CreditTopUp.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/CreditTopUp.tsx
index 47160190045..c996dacba22 100644
--- a/apps/studio/components/interfaces/Organization/BillingSettings/CreditTopUp.tsx
+++ b/apps/studio/components/interfaces/Organization/BillingSettings/CreditTopUp.tsx
@@ -410,7 +410,7 @@ export const CreditTopUp = ({ slug }: { slug: string | undefined }) => {
{creditPreview.tax_status === 'calculated' &&
creditPreview.tax &&
creditPreview.tax.tax_amount > 0 && (
- <p className="mt-2 text-xs text-foreground-muted">
+ <p className="mt-2 text-xs text-foreground-light">
You'll receive {formatCurrency(creditPreview.amount)} in credits.
</p>
)}
@@ -423,7 +423,9 @@ export const CreditTopUp = ({ slug }: { slug: string | undefined }) => {
<Button
htmlType="submit"
type="primary"
- loading={executingTopUp || paymentConfirmationLoading}
+ loading={
+ form.formState.isSubmitting || executingTopUp || paymentConfirmationLoading
+ }
disabled={isPreviewStale || creditPreviewIsFetching}
>
Top Up
diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx
index 8d806840a80..687bb4cecd3 100644
--- a/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx
+++ b/apps/studio/components/interfaces/Organization/BillingSettings/Subscription/SubscriptionPlanUpdateDialog.tsx
@@ -302,7 +302,7 @@ export const SubscriptionPlanUpdateDialog = ({
}
// Prepend the plan cost row when there are adjustment items to show
- if (changeType !== 'downgrade' && items.length > 0) {
+ if (items.length > 0) {
items.unshift({
type: 'amount',
label: `${subscriptionPlanMeta?.name} Plan`,
@@ -321,7 +321,6 @@ export const SubscriptionPlanUpdateDialog = ({
newPlanCost,
taxFailed,
customerBalance,
- changeType,
subscriptionPlanMeta?.name,
])