VercelIntegrationWindowLayout.tsx 1.1 KB

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