mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
Bring the Vercel project connect layout up to date with other connect screens. Follows up from https://github.com/supabase/supabase/pull/47550 which is required. | Before | After | | --- | --- | | <img width="2368" height="1680" alt="image" src="https://github.com/user-attachments/assets/f5c0b8ef-8fb5-4176-b0cf-98e33958dcc8" /> | <img width="848" height="808" alt="image" src="https://github.com/user-attachments/assets/e64c289f-0b73-4605-ad38-4552d3d6f934" /> | <img width="883" height="733" alt="image" src="https://github.com/user-attachments/assets/7ccd9b72-de6a-4c21-ac8e-abe773bb8116" /> ## Testing - Open the deploy preview or staging URL for `/dashboard/integrations/vercel/acme-production/marketplace/choose-project` with callback params from a real Vercel Marketplace install redirect (see _Vercel_ subheading below). ### Vercel - Run through the [install flow](https://github.com/supabase/supabase/pull/47550) on a real project until you get to the project connection screen, copy the url and paste into staging preview <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit * **New Features** * Introduced interstitial-style Vercel integration experiences for both install and choose-project flows, with improved page titles and clearer environment-variable guidance (including tooltip details). * **Bug Fixes** * Improved Vercel integration matching by configuration id and strengthened loading/error handling with more specific “not found” messaging. * **Refactor** * Enhanced the Vercel/GitHub project chooser with a dedicated interstitial mode. * Updated partner logo rendering to support optional styling customization. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
26 lines
731 B
TypeScript
26 lines
731 B
TypeScript
import type { Integration } from '@/data/integrations/integrations.types'
|
|
|
|
export function isVercelUrl(url: string): boolean {
|
|
try {
|
|
const u = new URL(url)
|
|
return u.protocol === 'https:' && u.hostname === 'vercel.com'
|
|
} catch {
|
|
// If the URL is invalid, return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
export function findVercelIntegrationByConfigurationId(
|
|
integrations: Integration[] | undefined,
|
|
configurationId: string | undefined
|
|
): Integration | undefined {
|
|
if (!configurationId) return undefined
|
|
|
|
return integrations?.find(
|
|
(integration) =>
|
|
integration.metadata !== undefined &&
|
|
'configuration_id' in integration.metadata &&
|
|
integration.metadata.configuration_id === configurationId
|
|
)
|
|
}
|