VercelIntegrationWindowLayout.tsx36 lines · main
1import { useParams } from 'common'
2import { PropsWithChildren } from 'react'
3import InlineSVG from 'react-inlinesvg'
4
5import IntegrationWindowLayout from './IntegrationWindowLayout'
6import { BASE_PATH } from '@/lib/constants'
7import { useIntegrationInstallationSnapshot } from '@/state/integration-installation'
8
9const VERCEL_ICON = (
10 <div className="bg-black shadow-sm rounded-sm p-1 w-8 h-8 flex justify-center items-center text-white">
11 <InlineSVG src={`${BASE_PATH}/img/icons/vercel-icon.svg`} title="Vercel Icon" className="w-4" />
12 </div>
13)
14
15const VercelIntegrationWindowLayout = ({ children }: PropsWithChildren<{}>) => {
16 const { externalId } = useParams()
17
18 const snapshot = useIntegrationInstallationSnapshot()
19
20 const title = externalId
21 ? 'Briven + Vercel Deploy Button'
22 : 'Briven + Vercel Integration Marketplace Connector'
23
24 return (
25 <IntegrationWindowLayout
26 title={title}
27 integrationIcon={VERCEL_ICON}
28 loading={snapshot.loading}
29 docsHref="https://supabase.com/partners/integrations/vercel"
30 >
31 {children}
32 </IntegrationWindowLayout>
33 )
34}
35
36export default VercelIntegrationWindowLayout