diff --git a/apps/www/_go/index.tsx b/apps/www/_go/index.tsx index f048385d219..5db678bb2c2 100644 --- a/apps/www/_go/index.tsx +++ b/apps/www/_go/index.tsx @@ -16,6 +16,7 @@ import stripeExecDinnerThankYou from './events/stripe-sessions-2026/exec-dinner- import stripeMeetingScheduler from './events/stripe-sessions-2026/meeting-scheduler' import stripeParty from './events/stripe-sessions-2026/party' import sxswContest from './events/sxsw-2026/contest' +import awsActivateOffer from './lead-gen/aws-activate-offer' import exampleLeadGen from './lead-gen/example-lead-gen' import amoe from './legal/amoe' import amoeThankYou from './legal/amoe-thankyou' @@ -29,6 +30,7 @@ import figmaWebinarMay2026ThankYou from './webinar/figma-webinar-may2026-thankyo import promptToProdSentry from './webinar/prompt-to-prod-sentry' const pages: GoPageInput[] = [ + awsActivateOffer, exampleLeadGen, byocEarlyAccess, amoe, diff --git a/apps/www/_go/lead-gen/aws-activate-offer.tsx b/apps/www/_go/lead-gen/aws-activate-offer.tsx new file mode 100644 index 00000000000..e00782d7494 --- /dev/null +++ b/apps/www/_go/lead-gen/aws-activate-offer.tsx @@ -0,0 +1,121 @@ +import type { GoPageInput } from 'marketing' + +import HubSpotFormEmbed from './components/HubSpotFormEmbed' + +const page: GoPageInput = { + template: 'lead-gen', + slug: 'aws-activate-offer', + metadata: { + title: 'Get $300 in Supabase credits through AWS Activate', + description: + 'Exclusively for VC-backed startups accessing Supabase through AWS Activate. Apply to receive $300 in Supabase credits.', + noIndex: true, + }, + hero: { + title: 'Get $300 in Supabase credits through AWS Activate', + description: + 'This offer is exclusively for VC-backed startups accessing Supabase through AWS Activate. Complete the form below to apply.', + image: { + src: 'https://zhfonblqamxferhoguzj.supabase.co/functions/v1/generate-og?template=partnerships&layout=icon-only©=%5B%24300%5D+in+credits+for%0AAWS+Activate+startups&icon=supabase.svg&icon2=aws.svg', + alt: 'Supabase and AWS Activate: $300 in credits for eligible startups', + width: 600, + height: 315, + }, + ctas: [ + { + label: 'Apply for your credits', + href: '#form', + variant: 'primary', + }, + ], + }, + sections: [ + { + type: 'single-column', + title: 'About the offer', + description: + 'Supabase is the easy-to-use, open-source managed Postgres with integrated backend services. With this exclusive AWS Activate offer, eligible startups receive $300 in Supabase credits to build, scale, and ship faster.', + }, + { + type: 'feature-grid', + title: 'What the credits unlock', + description: 'An all-in-one suite built on Postgres. Use one or all.', + columns: 3, + items: [ + { + title: 'Database', + description: 'A full Postgres instance hosted in the cloud.', + }, + { + title: 'Auth', + description: + 'A complete user management system with email, social, and passwordless login.', + }, + { + title: 'Storage', + description: 'Upload and serve files of any size.', + }, + { + title: 'Edge Functions', + description: 'Server-side TypeScript functions, distributed globally at the edge.', + }, + { + title: 'Realtime', + description: 'Live sync for collaborative applications, powered by Postgres replication.', + }, + { + title: 'Vector', + description: 'pgvector for fast semantic search and embedding storage.', + }, + ], + }, + { + type: 'steps', + title: 'Eligibility requirements', + description: 'To qualify for this offer you must:', + items: [ + { title: 'Be a VC-backed startup with less than $5M in total funding' }, + { title: 'Have an active AWS account' }, + { title: 'Not have previously redeemed this offer' }, + ], + }, + { + type: 'faq', + title: 'Frequently asked questions', + items: [ + { + question: 'Who is this offer for?', + answer: + 'VC-backed startups with less than $5M in total funding and an active AWS account.', + }, + { + question: 'What can I use the credits for?', + answer: + 'Credits apply to any Supabase product including database, auth, storage, and edge functions.', + }, + { + question: 'How long does it take to hear back?', + answer: + "We review applications within 5 business days. You'll receive a confirmation email once submitted.", + }, + { + question: 'What happens after I apply?', + answer: + 'If your application is approved, a member of our team will reach out to activate your credits.', + }, + ], + }, + { + type: 'single-column', + id: 'form', + title: 'Apply for your credits', + children: ( +
+ +
+ ), + }, + ], +} + +export default page diff --git a/apps/www/_go/lead-gen/components/HubSpotFormEmbed.tsx b/apps/www/_go/lead-gen/components/HubSpotFormEmbed.tsx new file mode 100644 index 00000000000..159cb31ebc2 --- /dev/null +++ b/apps/www/_go/lead-gen/components/HubSpotFormEmbed.tsx @@ -0,0 +1,92 @@ +'use client' + +import { useEffect, useId } from 'react' + +declare global { + interface Window { + hbspt?: { + forms: { + create: (config: { portalId: string; formId: string; target: string }) => void + } + } + } +} + +const HUBSPOT_SCRIPT_SRC = 'https://js.hsforms.net/forms/embed/v2.js' + +function loadHubSpotScript(): Promise { + return new Promise((resolve, reject) => { + if (window.hbspt) { + resolve() + return + } + + const existing = document.querySelector( + `script[src="${HUBSPOT_SCRIPT_SRC}"]` + ) + if (existing) { + existing.addEventListener('load', () => resolve(), { once: true }) + existing.addEventListener( + 'error', + () => reject(new Error('Failed to load HubSpot form script')), + { + once: true, + } + ) + return + } + + const script = document.createElement('script') + script.src = HUBSPOT_SCRIPT_SRC + script.async = true + script.defer = true + script.onload = () => resolve() + script.onerror = () => reject(new Error('Failed to load HubSpot form script')) + document.body.appendChild(script) + }) +} + +export default function HubSpotFormEmbed({ + portalId, + formId, +}: { + portalId: string + formId: string +}) { + const targetId = `hubspot-form-${useId().replace(/:/g, '-')}` + + useEffect(() => { + let cancelled = false + + const mountForm = async () => { + try { + await loadHubSpotScript() + if (cancelled || !window.hbspt) return + + const target = document.getElementById(targetId) + if (!target) return + + // Reset target to avoid duplicate forms on remounts. + while (target.firstChild) { + target.removeChild(target.firstChild) + } + + window.hbspt.forms.create({ + portalId, + formId, + target: `#${targetId}`, + }) + } catch (error) { + console.error('[go/hubspot] Failed to initialize HubSpot form embed', error) + } + } + + mountForm() + + return () => { + cancelled = true + } + }, [formId, portalId, targetId]) + + return
+}