Skip to content

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

issues with 'first project' picker

Jonathan Summers-Muir36a0899266f8
diff --git a/studio/components/interfaces/Integrations/ProjectLinker.tsx b/studio/components/interfaces/Integrations/ProjectLinker.tsx
index 1ce22bc28bf..9ac75b97b1d 100644
--- a/studio/components/interfaces/Integrations/ProjectLinker.tsx
+++ b/studio/components/interfaces/Integrations/ProjectLinker.tsx
@@ -19,6 +19,8 @@ import {
Popover_Shadcn_,
cn,
} from 'ui'
+import { useProjectsQuery } from 'data/projects/projects-query'
+import { useVercelProjectsQuery } from 'data/integrations/integrations-vercel-projects-query'
export interface Project {
id: string
@@ -132,6 +134,11 @@ const ProjectLinker = ({
)
}
+ const noSupabaseProjects = supabaseProjects.length === 0
+ const noForeignProjects = foreignProjects.length === 0
+ const missingEntityString = noSupabaseProjects ? 'Supabase' : 'Vercel'
+ const oppositeEntityString = noSupabaseProjects ? 'Vercel' : 'Supabase'
+
return (
<div className="flex flex-col gap-4">
<div className="relative border rounded-lg p-12 bg shadow">
@@ -139,13 +146,15 @@ const ProjectLinker = ({
className="absolute inset-0 bg-grid-black/5 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))]"
style={{ backgroundPosition: '10px 10px' }}
></div>
- {supabaseProjects.length === 0 ? (
+ {(supabaseProjects.length === 0 || foreignProjects.length === 0) &&
+ (!loadingForeignProjects || !loadingSupabaseProjects) ? (
<div className="text-center">
- <h5 className="text">No Supabase projects found</h5>
+ <h5 className="text">No {missingEntityString} Projects found</h5>
<p className="text-light text-sm">
- You will need to create a Supabase Project to link to a Vercel Project.
+ You will need to create a {missingEntityString} Project to link to a{' '}
+ {oppositeEntityString} Project.
<br />
- You can skip this and link a project later.
+ You can skip this and create a Project Connection later.
</p>
</div>
) : (
diff --git a/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx b/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx
index f2b092bf758..e4fb4d93012 100644
--- a/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx
+++ b/studio/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker.tsx
@@ -120,7 +120,7 @@ const SidePanelVercelProjectLinker = ({
return (
<SidePanel
- header={'Add GitHub repository'}
+ header={'Add new Vercel Project Connection'}
size="large"
visible={isOpen}
hideFooter
@@ -153,10 +153,7 @@ Check the details below before proceeding
The following environment variables will be added:
${ENV_VAR_RAW_KEYS.map((x) => {
- return `
- \n
- - \`${x}\`
-`
+ return `\n - \`${x}\``
})}
`}
/>
diff --git a/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx b/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx
index 68249a498ff..3b66c7ebb13 100644
--- a/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx
+++ b/studio/pages/integrations/vercel/[slug]/marketplace/choose-project.tsx
@@ -147,7 +147,7 @@ const VercelIntegration: NextPageWithLayout = () => {
<ScaffoldContainer className="flex flex-col gap-6 grow py-8">
<ScaffoldColumn className="!max-w-[900px] mx-auto w-full">
<header>
- <h1 className="text-xl text-scale-1200">Link a Supabase project to a Vercel project</h1>
+ <h1 className="text-xl text-scale-1200">Create your first Project Connection</h1>
<Markdown
className="text-scale-900"
content={`
@@ -155,7 +155,6 @@ This Supabase integration manages your environment variables automatically to pr
`}
/>
</header>
-
<ProjectLinker
organizationIntegrationId={integration?.id}
foreignProjects={vercelProjects}
@@ -179,10 +178,7 @@ This Supabase integration manages your environment variables automatically to pr
The following environment variables will be added:
${ENV_VAR_RAW_KEYS.map((x) => {
- return `
- \n
- - \`${x}\`
-`
+ return `\n - \`${x}\``
})}
`}
/>