The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: tidy up
phamhieudcb5b3d3aa45
diff --git a/studio/components/layouts/ProjectLayout/TestConnection.tsx b/studio/components/layouts/ProjectLayout/TestConnection.tsxindex a3c191d24be..00f8451919a 100644--- a/studio/components/layouts/ProjectLayout/TestConnection.tsx+++ b/studio/components/layouts/ProjectLayout/TestConnection.tsx@@ -3,6 +3,7 @@ import { observer } from 'mobx-react-lite'import { FC, ReactNode } from 'react'import { Project } from 'types'import BuildingState from 'components/to-be-cleaned/BuildingState'+import { PROJECT_STATUS } from 'lib/constants'interface Props {project: Project@@ -17,8 +18,8 @@ interface Props {*/const TestConnection: FC<Props> = ({ project, children }) => {const router = useRouter()- const isBuilding = ['COMING_UP', 'RESTORING'].includes(project?.status)- const isProjectActive = project.status === 'ACTIVE_HEALTHY'+ const isBuilding = [PROJECT_STATUS.COMING_UP, PROJECT_STATUS.RESTORING].includes(project?.status)+ const isProjectActive = project.status === PROJECT_STATUS.ACTIVE_HEALTHYif (isBuilding && router.asPath !== `/project/${project.ref}/building`) {router.push(`/project/${project.ref}/building`, undefined, { shallow: true })diff --git a/studio/components/to-be-cleaned/BuildingState.tsx b/studio/components/to-be-cleaned/BuildingState.tsxindex c4ec88a19b6..e23caf7c2af 100644--- a/studio/components/to-be-cleaned/BuildingState.tsx+++ b/studio/components/to-be-cleaned/BuildingState.tsx@@ -10,7 +10,7 @@ import ExampleProject from 'components/interfaces/Home/ExampleProject'import ClientLibrary from 'components/interfaces/Home/ClientLibrary'import { CLIENT_LIBRARIES, EXAMPLE_PROJECTS } from 'components/interfaces/Home/Home.constants'-import { API_URL } from 'lib/constants'+import { API_URL, PROJECT_STATUS } from 'lib/constants'import { useStore } from 'hooks'import { get } from 'lib/common/fetch'import { Project } from 'types'@@ -26,7 +26,7 @@ const ProjectBuildingState: FC<ProjectBuildingState> = ({ project }) => {const projectStatus = await get(`${API_URL}/projects/${project.ref}/status`)if (projectStatus && !projectStatus.error) {const { status } = projectStatus- if (status === 'ACTIVE_HEALTHY') {+ if (status === PROJECT_STATUS.ACTIVE_HEALTHY) {const res = await get(`${API_URL}/props/project/${project.ref}/connection-string`)if (res && res.connectionString) {app.onProjectConnectionStringUpdated(project.id, res.connectionString)@@ -55,7 +55,9 @@ const ProjectBuildingState: FC<ProjectBuildingState> = ({ project }) => {<div className="flex items-center gap-2"><IconLoader className="animate-spin" size={12} /><span>- {project.status === 'RESTORING' ? 'Restoring project' : 'Setting up project'}+ {project.status === PROJECT_STATUS.RESTORING+ ? 'Restoring project'+ : 'Setting up project'}</span></div></Badge>