Files
supabase/apps/www/components/Supasquad/CtaSection.tsx
Tomás PozoandTerry Sutton 3cc4e215d5 New supasquad page (#38441)
* Create initial draft

* Update application url

* Copy changes

* Update quote samples

* Fix typo

* Fix prop value

* Fix hydration errors

* Fix hydration errors, 2

* Fix hydration errors, 3

* Solve icons hydration issue

* Remove console log

* hide quotes

* Nudges

* Add form component and integration to notion (WIP)

* Fix some fields mapping

* Nudges and add form inline

* Some fixes

* Refactor notion lib

* Integrate customerio

* Remove logs

* Apply some minor fixes

* Add country selector and split location fields

* Mark required fields

* Add sentry error capturing

* Add sentry dsn routing to edge config

* Fix with a different sentry client

* Remove custom transport on default sentry

* Fix prettier issues

* Use node client on sentry

* Make monthly commitment text

* Minor improvements

* Use text monthly commitment in notion

* Remove country flag on select item for typing search

* Update apps/www/data/open-source/contributing/supasquad.tsx

* Restore form reset

* Fix missing env vars

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
2025-09-05 16:57:28 -02:30

58 lines
1.7 KiB
TypeScript

import Link from 'next/link'
import React from 'react'
import { Button, cn, Image } from 'ui'
import SectionContainer from '~/components/Layouts/SectionContainer'
interface Props {
id: string
title: string | React.ReactNode
subtitle?: string
primaryCta: {
label: string
url: string
target?: string
icon?: React.ReactNode
}
secondaryCta?: {
label: string
url: string
}
image?: {
dark: string
light: string
}
className?: string
}
const CtaSection = ({ id, title, subtitle, primaryCta, secondaryCta, className }: Props) => {
return (
<SectionContainer
id={id}
className={cn('py-16 md:py-24 lg:py-32 relative overflow-hidden', className)}
>
<div className="mx-auto relative z-10">
<div className="flex flex-col gap-6 text-center items-center max-w-5xl mx-auto">
<h2 className="text-foreground-light text-2xl lg:text-3xl leading-tight">{title}</h2>
{subtitle && <p className="text-foreground-light text-lg">{subtitle}</p>}
<div className="flex flex-wrap gap-3 pt-4">
<Button asChild size="medium" icon={primaryCta.icon}>
<Link href={primaryCta.url} target={primaryCta.target}>
{primaryCta.label}
</Link>
</Button>
{secondaryCta && (
<Button asChild size="medium" type="default">
<Link href={secondaryCta.url}>{secondaryCta.label}</Link>
</Button>
)}
</div>
</div>
</div>
<div className="absolute inset-0 w-full h-full bg-gradient-to-r from-transparent via-transparent to-background opacity-80 z-0"></div>
</SectionContainer>
)
}
export default CtaSection