import { Card } from 'ui' import { Admonition } from 'ui-patterns/Admonition' import { AWSPrivateLinkSection } from './AWSPrivateLink/AWSPrivateLinkSection' import { GitHubSection } from './GithubIntegration/GithubSection' import { VercelSection } from './VercelIntegration/VercelSection' import { SidePanelVercelProjectLinker } from '@/components/interfaces/Organization/IntegrationSettings/SidePanelVercelProjectLinker' import { InlineLink } from '@/components/ui/InlineLink' import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled' import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject' import { BASE_PATH } from '@/lib/constants' export const IntegrationImageHandler = ({ title }: { title: 'vercel' | 'github' | 'aws' }) => { return ( {`${title} ) } const INTEGRATION_ICONS: Record< 'vercel' | 'github' | 'aws', (className: string) => React.ReactNode > = { github: (className) => ( ), vercel: (className) => ( ), aws: (className) => ( ), } export const IntegrationSectionIcon = ({ title }: { title: 'vercel' | 'github' | 'aws' }) => { return (
{INTEGRATION_ICONS[title]('h-5 w-5')}
) } export const IntegrationSettings = () => { const { data: project } = useSelectedProjectQuery() const isBranch = project?.parent_project_ref !== undefined const showVercelIntegration = useIsFeatureEnabled('integrations:vercel') const showAWSPrivateLinkFeature = useIsFeatureEnabled('integrations:aws_private_link') // PrivateLink is not available in eu-central-2 (Zurich) until Feb 2026 const isPrivateLinkUnsupportedRegion = project?.region === 'eu-central-2' const showAWSPrivateLink = showAWSPrivateLinkFeature && !isPrivateLinkUnsupportedRegion return ( <> {isBranch && ( To adjust your project's integration settings, you may return to your{' '} main branch . )} {showVercelIntegration && ( <> )} {showAWSPrivateLink && } ) }