Skip to content

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

Add some scaffolding for vercel integration

Joshen Lim25c09c41441a
diff --git a/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx b/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx
index a01d6562651..a25064e2241 100644
--- a/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx
+++ b/studio/components/layouts/AppLayout/EnableBranchingButton/EnableBranchingButton.tsx
@@ -12,6 +12,7 @@ import { useSelectedOrganization, useStore } from 'hooks'
import { useAppUiStateSnapshot } from 'state/app'
import BranchingWaitlistPopover from './BranchingWaitlistPopover'
import GithubRepositorySelection from './GithubRepositorySelection'
+import VercelProjectSelection from './VercelProjectSelection'
const EnableBranchingButton = () => {
const { ui } = useStore()
@@ -54,12 +55,13 @@ const EnableBranchingButton = () => {
integration.connections.some((connection) => connection.supabase_project_ref === ref)
)
- // [Joshen] Leaving this out first as not clear yet branching x vercel implementation
+ // [Joshen] Leaving this out first
+ // const hasVercelIntegrationInstalled =
+ // integrations?.some((integration) => integration.integration.name === 'Vercel') ?? false
// const vercelIntegration = integrations?.find(
- // (integration) => integration.integration.name === 'Vercel'
- // )
- // const vercelProjectIntegration = vercelIntegration?.connections.find(
- // (connection) => connection.supabase_project_ref === ref
+ // (integration) =>
+ // integration.integration.name === 'Vercel' &&
+ // integration.connections.some((connection) => connection.supabase_project_ref === ref)
// )
const onEnableBranching = () => {
@@ -88,7 +90,7 @@ const EnableBranchingButton = () => {
className="!bg"
size="medium"
>
- <Modal.Content className="p-7 flex items-center space-x-4">
+ <Modal.Content className="px-7 py-5 flex items-center space-x-4">
<IconGitBranch strokeWidth={2} size={20} />
<div>
<p className="text">Enable database branching</p>
diff --git a/studio/components/layouts/AppLayout/EnableBranchingButton/VercelProjectSelection.tsx b/studio/components/layouts/AppLayout/EnableBranchingButton/VercelProjectSelection.tsx
index fcc4a3e6758..333f096d07c 100644
--- a/studio/components/layouts/AppLayout/EnableBranchingButton/VercelProjectSelection.tsx
+++ b/studio/components/layouts/AppLayout/EnableBranchingButton/VercelProjectSelection.tsx
@@ -2,6 +2,7 @@ import { useParams } from 'common'
import { Badge, Button, Modal } from 'ui'
import { Integration } from 'data/integrations/integrations.types'
+import Link from 'next/link'
interface VercelProjectSelectionProps {
integration?: Integration
@@ -24,9 +25,13 @@ const VercelProjectSelection = ({ integration }: VercelProjectSelectionProps) =>
Previews can be available by connecting your Supabase project to a Vercel project.
</p>
{!integration && (
- <Button type="default" className="!mt-3" onClick={() => {}}>
- Install Vercel Integration
- </Button>
+ <Link passHref href="https://vercel.com/integrations/supabase-v2-local">
+ <a target="_blank" rel="noreferrer">
+ <Button type="default" className="!mt-3">
+ Install Vercel Integration
+ </Button>
+ </a>
+ </Link>
)}
{integration && !vercelProjectIntegration && <div>Connect project</div>}
{integration && vercelProjectIntegration && <div>Select project</div>}