The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: Disable paused projects (#46503)
Jeremias Menichelli3260660daa86
diff --git a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsxindex 105cb3e45b6..364af234717 100644--- a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx+++ b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.ComboBox.tsx@@ -21,6 +21,7 @@ export interface ComboBoxOption {id: stringvalue: stringdisplayName: string+ disabled?: boolean}export function ComboBox<Opt extends ComboBoxOption>({@@ -131,6 +132,7 @@ export function ComboBox<Opt extends ComboBoxOption>({{options.map((option) => (<CommandItemkey={option.id}+ disabled={option.disabled}value={option.value}onSelect={(selectedValue: string) => {setOpen(false)diff --git a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsxindex 2d3e35735ca..5d1b080bde7 100644--- a/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx+++ b/apps/docs/components/ProjectConfigVariables/ProjectConfigVariables.tsx@@ -138,10 +138,14 @@ function OrgProjectSelector() {: (projects!.map((project) => {const organization = organizations!.find((org) => org.id === project.organization_id)!+ const paused = isProjectPaused(project)return {id: project.ref,value: toOrgProjectValue(organization, project),- displayName: toDisplayNameOrgProject(organization, project),+ displayName: paused+ ? `${toDisplayNameOrgProject(organization, project)} (paused)`+ : toDisplayNameOrgProject(organization, project),+ disabled: paused,}}).filter(Boolean) as ComboBoxOption[]),@@ -162,10 +166,14 @@ function OrgProjectSelector() {if (storedOrg && storedProject && storedProject.organization_id === storedOrg.id) {setSelectedOrgProject(storedOrg, storedProject)- } else if (projects!.length > 0) {- const firstProject = projects![0]- const matchingOrg = organizations!.find((org) => org.id === firstProject.organization_id)- if (matchingOrg) setSelectedOrgProject(matchingOrg, firstProject)+ } else {+ const firstActiveProject = projects!.find((project) => !isProjectPaused(project))+ if (firstActiveProject) {+ const matchingOrg = organizations!.find(+ (org) => org.id === firstActiveProject.organization_id+ )+ if (matchingOrg) setSelectedOrgProject(matchingOrg, firstActiveProject)+ }}}}, [organizations, projects, selectedOrg, selectedProject, setSelectedOrgProject, stateSummary])