The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Refactor disabled warning into a single component to be potentially used else where in response to an incident
Joshen Lim0f7b14ae7201
diff --git a/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx b/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsxindex 5028a4d48e8..393fc4d615d 100644--- a/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx+++ b/studio/components/interfaces/Billing/AddOns/ComputeSizeSelection.tsx@@ -4,7 +4,7 @@ import { Badge, Button, Radio } from '@supabase/ui'import { useStore, useFlag } from 'hooks'import { getProductPrice } from '../Billing.utils'-import AddonUpdateDisabledWarning from './AddonUpdateDisabledWarning'+import DisabledWarningDueToIncident from 'components/ui/DisabledWarningDueToIncident'interface Props {computeSizes: any[]@@ -29,7 +29,7 @@ const ComputeSizeSelection: FC<Props> = ({ computeSizes, selectedComputeSize, on</p></div>{addonUpdateDisabled ? (- <AddonUpdateDisabledWarning />+ <DisabledWarningDueToIncident title="Updating database add-ons is currently disabled" />) : (<Radio.Group type="cards" className="billing-compute-radio">{computeSizes.map((option: any) => {diff --git a/studio/components/interfaces/Organization/NewProject/ProjectCreationDisabledWarning.tsx b/studio/components/interfaces/Organization/NewProject/ProjectCreationDisabledWarning.tsxdeleted file mode 100644index ecc16cbed27..00000000000--- a/studio/components/interfaces/Organization/NewProject/ProjectCreationDisabledWarning.tsx+++ /dev/null@@ -1,27 +0,0 @@-import { IconAlertCircle } from '@supabase/ui'-import InformationBox from 'components/ui/InformationBox'--const ProjectCreationDisabledWarning = () => {- return (- <div className="mt-4">- <InformationBox- icon={<IconAlertCircle className="text-white" size="large" strokeWidth={1.5} />}- defaultVisibility={true}- hideCollapse- title="Project creation is currently disabled"- description={- <div className="space-y-3">- <p className="text-sm leading-normal">- Our engineers are currently working on a fix. You can follow updates on{' '}- <a className="text-brand-900" href="https://status.supabase.com/">- https://status.supabase.com/- </a>- </p>- </div>- }- />- </div>- )-}--export default ProjectCreationDisabledWarningdiff --git a/studio/components/interfaces/Organization/NewProject/index.ts b/studio/components/interfaces/Organization/NewProject/index.tsindex dd0337dbb3b..38f93a6cd6b 100644--- a/studio/components/interfaces/Organization/NewProject/index.ts+++ b/studio/components/interfaces/Organization/NewProject/index.ts@@ -1,11 +1,5 @@import NotOrganizationOwnerWarning from './NotOrganizationOwnerWarning'import FreeProjectLimitWarning from './FreeProjectLimitWarning'-import ProjectCreationDisabledWarning from './ProjectCreationDisabledWarning'import EmptyPaymentMethodWarning from './EmptyPaymentMethodWarning'-export {- NotOrganizationOwnerWarning,- FreeProjectLimitWarning,- ProjectCreationDisabledWarning,- EmptyPaymentMethodWarning,-}+export { NotOrganizationOwnerWarning, FreeProjectLimitWarning, EmptyPaymentMethodWarning }diff --git a/studio/components/interfaces/Billing/AddOns/AddonUpdateDisabledWarning.tsx b/studio/components/ui/DisabledWarningDueToIncident.tsxsimilarity index 77%rename from studio/components/interfaces/Billing/AddOns/AddonUpdateDisabledWarning.tsxrename to studio/components/ui/DisabledWarningDueToIncident.tsxindex cea6196deff..503ab65ce4c 100644--- a/studio/components/interfaces/Billing/AddOns/AddonUpdateDisabledWarning.tsx+++ b/studio/components/ui/DisabledWarningDueToIncident.tsx@@ -1,13 +1,18 @@+import { FC } from 'react'import { IconAlertCircle } from '@supabase/ui'import InformationBox from 'components/ui/InformationBox'-const AddonUpdateDisabledWarning = () => {+interface Props {+ title: string+}++const DisabledWarningDueToIncident: FC<Props> = ({ title }) => {return (<InformationBoxicon={<IconAlertCircle className="text-white" size="large" strokeWidth={1.5} />}defaultVisibility={true}hideCollapse- title="Updating database add-ons is currently disabled"+ title={title}description={<div className="space-y-3"><p className="text-sm leading-normal">@@ -22,4 +27,4 @@ const AddonUpdateDisabledWarning = () => {)}-export default AddonUpdateDisabledWarning+export default DisabledWarningDueToIncidentdiff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsxindex 77828623cca..fdeff18dffb 100644--- a/studio/pages/new/[slug].tsx+++ b/studio/pages/new/[slug].tsx@@ -29,10 +29,10 @@ import { useStore, useFlag, withAuth, useSubscriptionStats } from 'hooks'import { WizardLayoutWithoutAuth } from 'components/layouts'import Panel from 'components/to-be-cleaned/Panel'import PasswordStrengthBar from 'components/ui/PasswordStrengthBar'+import DisabledWarningDueToIncident from 'components/ui/DisabledWarningDueToIncident'import {FreeProjectLimitWarning,NotOrganizationOwnerWarning,- ProjectCreationDisabledWarning,EmptyPaymentMethodWarning,} from 'components/interfaces/Organization/NewProject'@@ -231,7 +231,7 @@ const Wizard: NextPageWithLayout = () => {</Panel.Content>{projectCreationDisabled ? (<Panel.Content className="border-panel-border-interior-light dark:border-panel-border-interior-dark border-t pb-8">- <ProjectCreationDisabledWarning />+ <DisabledWarningDueToIncident title="Project creation is currently disabled" /></Panel.Content>) : (<>