The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
add link to configure vercel integration
Alaister Young68077138dfa5
diff --git a/studio/components/interfaces/Integrations/IntegrationPanels.tsx b/studio/components/interfaces/Integrations/IntegrationPanels.tsxindex 1a49c940689..e4e6d36cb9f 100644--- a/studio/components/interfaces/Integrations/IntegrationPanels.tsx+++ b/studio/components/interfaces/Integrations/IntegrationPanels.tsx@@ -6,7 +6,8 @@ import { Markdown } from 'components/interfaces/Markdown'import { Integration, IntegrationProjectConnection } from 'data/integrations/integrations.types'import { useProjectsQuery } from 'data/projects/projects-query'import { BASE_PATH } from 'lib/constants'-import { Badge, Button, IconArrowRight, IconGitHub, IconSquare, cn } from 'ui'+import { getVercelConfigurationUrl } from 'lib/integration-utils'+import { Badge, Button, IconArrowRight, IconExternalLink, IconGitHub, IconSquare, cn } from 'ui'const ICON_STROKE_WIDTH = 2const ICON_SIZE = 14@@ -110,7 +111,16 @@ const IntegrationInstallation = React.forwardRef<HTMLLIElement, IntegrationInsta</div></div>- <Button type="default">Manage</Button>+ <Button type="default" asChild iconRight={<IconExternalLink />}>+ {/* hard coded to vercel for now, TODO: move to a prop */}+ <a+ href={getVercelConfigurationUrl(integration)}+ target="_blank"+ rel="noopener noreferrer"+ >+ Manage+ </a>+ </Button></li>)}diff --git a/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx b/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsxindex 5e406fef7f9..047c39bdfd2 100644--- a/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx+++ b/studio/components/interfaces/Organization/IntegrationSettings/IntegrationSettings.tsx@@ -2,6 +2,7 @@ import { ScaffoldDivider } from 'components/layouts/Scaffold'import { useOrgIntegrationsQuery } from 'data/integrations/integrations-query-org-only'import { useVercelProjectsQuery } from 'data/integrations/integrations-vercel-projects-query'import { useSelectedOrganization } from 'hooks'+import { getVercelConfigurationUrl } from 'lib/integration-utils'import Integration from './Integration'import SidePanelVercelProjectLinker from './SidePanelVercelProjectLinker'@@ -54,10 +55,12 @@ Supabase will keep the right environment variables up to date in each of the proYou can also link multiple Vercel Projects to the same Supabase project.`}note={- vercelProjectCount > 0+ vercelProjectCount > 0 && vercelIntegration !== undefined? `Your Vercel connection has access to ${vercelProjectCount} Vercel Projects.-You can change the scope of the access for Supabase by configuring [here](https://vercel.com/dashboard/integrations/${vercelIntegration?.metadata?.configuration_id}).+You can change the scope of the access for Supabase by configuring [here](${getVercelConfigurationUrl(+ vercelIntegration+ )}).`: undefined}diff --git a/studio/data/integrations/integrations.types.ts b/studio/data/integrations/integrations.types.tsindex e0a84f9fa78..7d286b776ab 100644--- a/studio/data/integrations/integrations.types.ts+++ b/studio/data/integrations/integrations.types.ts@@ -157,7 +157,7 @@ type addedBy = userDetailstype updatedBy = userDetailsexport type IntegrationName = 'Vercel' | 'Netlify' | 'GitHub'-export type VercelAcccountType = 'team' | 'personal'+export type VercelAccountType = 'Team' | 'Personal'export type VercelSource = 'marketplace' | 'deploy button'export type Integration = {@@ -177,7 +177,7 @@ export type Integration = {gitHubConnectionOwner?: stringaccount: {name: string- type: VercelAcccountType+ type: VercelAccountTypeavatar: stringsource: VercelSourceowner_id: stringdiff --git a/studio/lib/integration-utils.ts b/studio/lib/integration-utils.tsindex 63f9a93969f..3edbd9be5c5 100644--- a/studio/lib/integration-utils.ts+++ b/studio/lib/integration-utils.ts@@ -1,3 +1,4 @@+import { Integration } from 'data/integrations/integrations.types'import { ResponseFailure } from 'types'type SupaResponse<T> = T | ResponseFailure@@ -113,3 +114,9 @@ export async function getInitialMigrationSQLFromGitHubRepo(return `${migrations};${migrationsTableSql};${seed}`}++export function getVercelConfigurationUrl(integration: Integration) {+ return `https://vercel.com/dashboard/${+ integration.metadata?.account.type === 'Team' ? `${integration.metadata?.account.slug}/` : ''+ }integrations/${integration.metadata?.configuration_id}`+}