The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: isInvalidSlug wrong logic (#18744)
Alaister Young00662a61fe00
diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsxindex 59fb7988061..cdc9e1e84ea 100644--- a/studio/pages/new/[slug].tsx+++ b/studio/pages/new/[slug].tsx@@ -83,7 +83,7 @@ const Wizard: NextPageWithLayout = () => {)const isAdmin = useCheckPermissions(PermissionAction.CREATE, 'projects')- const isInvalidSlug = currentOrg !== undefined+ const isInvalidSlug = isOrganizationsSuccess && currentOrg === undefinedconst isEmptyOrganizations = (organizations?.length ?? 0) <= 0 && isOrganizationsSuccessconst hasMembersExceedingFreeTierLimit = (membersExceededLimit || []).length > 0@@ -116,12 +116,12 @@ const Wizard: NextPageWithLayout = () => {useEffect(() => {/** Redirect to first org if the slug doesn't match an org slug- * this is mainly to capture the /project/new url, which is redirected from database.new+ * this is mainly to capture the /new/new-project url, which is redirected from database.new*/if (isInvalidSlug && (organizations?.length ?? 0) > 0) {router.push(`/new/${organizations?.[0].slug}`)}- }, [isInvalidSlug, organizations, router])+ }, [isInvalidSlug, organizations])useEffect(() => {// User added a new payment method