mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
Replaces the "Apply to Join SupaSquad" button on /open-source/contributing/supasquad with an "Applications are currently paused" callout linking to Discord, upcoming events, and GitHub. - `CtaSection` gains an optional `notice` prop; buttons are now optional. - To reopen applications, remove `notice` and restore `primaryCta` in `data/open-source/contributing/supasquad.tsx`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
81 lines
2.2 KiB
TypeScript
81 lines
2.2 KiB
TypeScript
import Link from 'next/link'
|
|
import React from 'react'
|
|
import { Button, cn } from 'ui'
|
|
|
|
import SectionContainer from '@/components/Layouts/SectionContainer'
|
|
|
|
interface Props {
|
|
id: string
|
|
title: string | React.ReactNode
|
|
subtitle?: string
|
|
notice?: {
|
|
title: string
|
|
body: React.ReactNode
|
|
}
|
|
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,
|
|
notice,
|
|
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>}
|
|
{notice && (
|
|
<div className="border rounded-lg bg-surface-100 px-6 py-5 text-center max-w-2xl">
|
|
<p className="text-foreground font-medium">{notice.title}</p>
|
|
<p className="text-foreground-light text-base mt-2">{notice.body}</p>
|
|
</div>
|
|
)}
|
|
{(primaryCta || secondaryCta) && (
|
|
<div className="flex flex-wrap gap-3 pt-4">
|
|
{primaryCta && (
|
|
<Button variant="primary" asChild size="medium" icon={primaryCta.icon}>
|
|
<Link href={primaryCta.url} target={primaryCta.target}>
|
|
{primaryCta.label}
|
|
</Link>
|
|
</Button>
|
|
)}
|
|
{secondaryCta && (
|
|
<Button asChild size="medium">
|
|
<Link href={secondaryCta.url}>{secondaryCta.label}</Link>
|
|
</Button>
|
|
)}
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
|
|
<div className="absolute inset-0 w-full h-full bg-linear-to-r from-transparent via-transparent to-background opacity-80 z-0"></div>
|
|
</SectionContainer>
|
|
)
|
|
}
|
|
|
|
export default CtaSection
|