Skip to content

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

Merge branch 'master' into chore/show-readonly-badge-on-project-card

Alaister Younga76ebe7f0ef7
diff --cc studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
index dff7b3a46bd,13ee057ed92..02126a1cf98
--- a/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
+++ b/studio/components/interfaces/Home/ProjectList/ProjectCard.tsx
@@@ -1,11 -1,9 +1,11 @@@
+import { Badge, IconAlertTriangle, IconLoader, IconPauseCircle } from 'ui'
+
import CardButton from 'components/ui/CardButton'
+import { useProjectReadOnlyStatusQuery } from 'data/projects/project-readonly-status-query'
import { PROJECT_STATUS } from 'lib/constants'
import { Project } from 'types'
-import { Badge, IconLoader, IconPauseCircle } from 'ui'
- interface ProjectCardProps {
+ export interface ProjectCardProps {
project: Project
rewriteHref?: string
}
@@@ -14,14 -12,10 +14,15 @@@ const ProjectCard = ({ project, rewrite
const { name, ref: projectRef } = project
const desc = `${project.cloud_provider} | ${project.region}`
+ const { data: readonlyStatus } = useProjectReadOnlyStatusQuery({ projectRef })
+
- // Project status should supercede is read only status
++ // Project status should supersede is read only status
+ const isHealthy = project.status === PROJECT_STATUS.ACTIVE_HEALTHY
- const isPausing = project.status === PROJECT_STATUS.GOING_DOWN
+ const isPausing =
+ project.status === PROJECT_STATUS.GOING_DOWN || project.status === PROJECT_STATUS.PAUSING
const isPaused = project.status === PROJECT_STATUS.INACTIVE
const isRestoring = project.status === PROJECT_STATUS.RESTORING
+ const isReadonly = readonlyStatus?.enabled ?? false
return (
<li className="col-span-1">