Skip to content

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

Skip calling available versions on wildcard new page (#34466)

Joshen Lim18ec21246dc8
diff --git a/apps/studio/data/config/project-creation-postgres-versions-query.ts b/apps/studio/data/config/project-creation-postgres-versions-query.ts
index 119151c5587..599dc875fc2 100644
--- a/apps/studio/data/config/project-creation-postgres-versions-query.ts
+++ b/apps/studio/data/config/project-creation-postgres-versions-query.ts
@@ -55,7 +55,11 @@ export const useProjectCreationPostgresVersionsQuery = <TData = ProjectCreationP
({ signal }) =>
getPostgresCreationVersions({ organizationSlug, cloudProvider, dbRegion }, signal),
{
- enabled: enabled && typeof organizationSlug !== 'undefined',
+ enabled:
+ enabled &&
+ typeof organizationSlug !== 'undefined' &&
+ organizationSlug !== '_' &&
+ typeof dbRegion !== 'undefined',
...options,
}
)
diff --git a/apps/studio/pages/new/[slug].tsx b/apps/studio/pages/new/[slug].tsx
index 621b4e42399..bdae8a3c438 100644
--- a/apps/studio/pages/new/[slug].tsx
+++ b/apps/studio/pages/new/[slug].tsx
@@ -357,7 +357,7 @@ const Wizard: NextPageWithLayout = () => {
useEffect(() => {
// [Joshen] Cause slug depends on router which doesnt load immediately on render
// While the form data does load immediately
- if (slug) form.setValue('organization', slug)
+ if (slug && slug !== '_') form.setValue('organization', slug)
if (projectName) form.setValue('projectName', projectName || '')
}, [slug])
@@ -456,6 +456,7 @@ const Wizard: NextPageWithLayout = () => {
field.onChange(slug)
router.push(`/new/${slug}`)
}}
+ value={field.value}
defaultValue={field.value}
>
<FormControl_Shadcn_>