Skip to content

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

Show warning messages better on the project creation page

Joshen Lim20f2ba39ef07
diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsx
index dc27ce64e84..3bcf9db40a1 100644
--- a/studio/pages/new/[slug].tsx
+++ b/studio/pages/new/[slug].tsx
@@ -245,11 +245,7 @@ export const Wizard = observer(() => {
))}
</Listbox>
- {!currentOrg?.is_owner ? (
- <NotOrganizationOwnerWarning />
- ) : (
- <>{isSelectFreeTier && isOverFreeProjectLimit && <FreeProjectLimitWarning />}</>
- )}
+ {!currentOrg?.is_owner && <NotOrganizationOwnerWarning />}
</Panel.Content>
{canCreateProject && (
@@ -296,36 +292,39 @@ export const Wizard = observer(() => {
description="Select a region close to you for the best performance."
/>
</Panel.Content>
-
- <Panel.Content className="Form section-block--body has-inputs-centered ">
- <Listbox
- label="Pricing Plan"
- layout="horizontal"
- value={dbPricingPlan}
- onChange={onDbPricingPlanChange}
- // @ts-ignore
- descriptionText={
- <>
- Select a plan that suits your needs.&nbsp;
- <a className="underline" target="_blank" href="https://supabase.com/pricing">
- More details
- </a>
- </>
- }
- >
- {Object.entries(PRICING_PLANS).map(([k, v]) => (
- <Listbox.Option key={k} label={v} value={v}>
- {`${v}${v === PRICING_PLANS.PRO ? ' - $25/month' : ''}`}
- </Listbox.Option>
- ))}
- </Listbox>
-
- {!isSelectFreeTier && isEmptyPaymentMethod && (
- <EmptyPaymentMethodWarning stripeCustomerId={stripeCustomerId} />
- )}
- </Panel.Content>
</>
)}
+
+ {currentOrg?.is_owner && (
+ <Panel.Content className="Form section-block--body has-inputs-centered ">
+ <Listbox
+ label="Pricing Plan"
+ layout="horizontal"
+ value={dbPricingPlan}
+ onChange={onDbPricingPlanChange}
+ // @ts-ignore
+ descriptionText={
+ <>
+ Select a plan that suits your needs.&nbsp;
+ <a className="underline" target="_blank" href="https://supabase.com/pricing">
+ More details
+ </a>
+ </>
+ }
+ >
+ {Object.entries(PRICING_PLANS).map(([k, v]) => (
+ <Listbox.Option key={k} label={v} value={v}>
+ {`${v}${v === PRICING_PLANS.PRO ? ' - $25/month' : ''}`}
+ </Listbox.Option>
+ ))}
+ </Listbox>
+
+ {isSelectFreeTier && isOverFreeProjectLimit && <FreeProjectLimitWarning />}
+ {!isSelectFreeTier && isEmptyPaymentMethod && (
+ <EmptyPaymentMethodWarning stripeCustomerId={stripeCustomerId} />
+ )}
+ </Panel.Content>
+ )}
</>
</Panel>
</WizardLayout>