Skip to content

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

Fix new projects not seeing new project section

Joshen Lim3b1838fb4676
diff --git a/studio/components/interfaces/Home/ProjectUsageSection.tsx b/studio/components/interfaces/Home/ProjectUsageSection.tsx
index df3811a5e14..932f22577be 100644
--- a/studio/components/interfaces/Home/ProjectUsageSection.tsx
+++ b/studio/components/interfaces/Home/ProjectUsageSection.tsx
@@ -11,6 +11,14 @@ const ProjectUsageSection: FC = observer(({}) => {
const { ref: projectRef } = useParams()
const { data: usage, error: usageError, isLoading } = useProjectUsageQuery({ projectRef })
+ const usageColumns = [
+ 'db_egress',
+ 'storage_egress',
+ 'monthly_active_users',
+ 'realtime_message_count',
+ 'func_invocations',
+ ]
+
if (usageError) {
return (
<InformationBox
@@ -23,7 +31,7 @@ const ProjectUsageSection: FC = observer(({}) => {
}
const hasProjectData = usage
- ? Object.keys(usage)
+ ? usageColumns
.map((key) => usage[key as ProjectUsageResponseUsageKeys].usage)
.some((usage) => (usage ?? 0) > 0)
: false