The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: clear warning for $25 charge when creating a Pro project
Jonathan Summers-Muirb64046096e3e
diff --git a/studio/components/ui/InformationBox.tsx b/studio/components/ui/InformationBox.tsxindex f89b621ce44..93a91f7f45e 100644--- a/studio/components/ui/InformationBox.tsx+++ b/studio/components/ui/InformationBox.tsx@@ -31,19 +31,19 @@ const InformationBox: FC<Props> = ({return (<divclassName={`${block ? 'block w-full' : ''}- block w-full bg-scale-100 dark:bg-scale-400 py-3 border border-scale-600 dark:border-scale-500 rounded ${className}`}+ bg-scale-100 dark:bg-scale-400 border-scale-600 dark:border-scale-500 block w-full rounded border py-3 ${className}`}><div className="flex flex-col px-4"><div className="flex items-center justify-between">- <div className="flex space-x-3 w-full lg:items-center">+ <div className="flex w-full space-x-3 lg:items-center"><span className="text-scale-900">{icon}</span><div className="flex-grow">- <h5 className="text-sm text-scale-1200">{title}</h5>+ <h5 className="text-scale-1200 text-sm">{title}</h5></div></div>{description && !hideCollapse ? (<div- className="cursor-pointer text-scale-900"+ className="text-scale-900 cursor-pointer"onClick={() => setIsExpanded(!isExpanded)}>{isExpanded ? (@@ -55,18 +55,18 @@ const InformationBox: FC<Props> = ({) : null}</div><div- className={`transition-all flex flex-col space-y-3 overflow-hidden ${+ className={`flex flex-col space-y-3 overflow-hidden transition-all ${isExpanded ? 'mt-3' : ''}`}style={{ maxHeight: isExpanded ? 500 : 0 }}>- <p className="text-sm text-scale-1100">{description}</p>+ <p className="text-scale-1100 text-sm">{description}</p>{url && (<ahref={url}target="_blank"- className="text-sm transition-colors underline text-scale-1100 hover:text-scale-1200"+ className="text-scale-1100 hover:text-scale-1200 text-sm underline transition-colors">{urlLabel}</a>diff --git a/studio/lib/constants/infrastructure.ts b/studio/lib/constants/infrastructure.tsindex 4dbba6f83e8..c1911762535 100644--- a/studio/lib/constants/infrastructure.ts+++ b/studio/lib/constants/infrastructure.ts@@ -21,8 +21,8 @@ export const REGIONS = {export const REGIONS_DEFAULT = REGIONS.EAST_USexport const PRICING_TIER_LABELS = {- FREE: 'Free tier',- PRO: 'Pro tier',+ FREE: 'Free',+ PRO: 'Pro',}export const PRICING_TIER_PRODUCT_IDS = {diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsxindex 0af66a4ed20..292ea305935 100644--- a/studio/pages/new/[slug].tsx+++ b/studio/pages/new/[slug].tsx@@ -7,7 +7,7 @@ import { useRef, useState, useEffect } from 'react'import { debounce, isUndefined, values } from 'lodash'import { toJS } from 'mobx'import { observer } from 'mobx-react-lite'-import { Button, Listbox, IconUsers, IconAlertCircle, Input, IconLoader } from '@supabase/ui'+import { Button, Listbox, IconUsers, IconAlertCircle, Input, IconLoader, Alert } from '@supabase/ui'import { getURL, passwordStrength } from 'lib/helpers'import { post } from 'lib/common/fetch'@@ -363,19 +363,36 @@ const Wizard: NextPageWithLayout = () => {<a className="underline" target="_blank" href="https://supabase.com/pricing">More details</a>+ {!isSelectFreeTier && !isEmptyPaymentMethod && (+ <Alert+ title="Your payment method will be charged"+ variant="warning"+ withIcon+ className="mt-3"+ >+ <p>+ By creating a new Pro Project, there will be an immediate charge of $25+ once the project has been created.+ </p>+ </Alert>+ )}</>}>- {Object.entries(PRICING_TIER_LABELS).map(([k, v]) => (- <Listbox.Option key={k} label={v} value={k}>- {`${v}${k === 'PRO' ? ' - $25/month' : ''}`}- </Listbox.Option>- ))}+ {Object.entries(PRICING_TIER_LABELS).map(([k, v]) => {+ const label = `${v}${k === 'PRO' ? ' - $25/month' : ' - $0/month'}`+ return (+ <Listbox.Option key={k} label={label} value={k}>+ {label}+ </Listbox.Option>+ )+ })}</Listbox>{isSelectFreeTier && isOverFreeProjectLimit && (<FreeProjectLimitWarning limit={freeProjectsLimit} />)}+{!isSelectFreeTier && isEmptyPaymentMethod && (<EmptyPaymentMethodWarning stripeCustomerId={stripeCustomerId} />)}