+ )
+}
export default ProductHeader
diff --git a/apps/www/components/Sections/ProductsCta2.tsx b/apps/www/components/Sections/ProductsCta2.tsx
index d25b2e25d59..dc85a0aa3e9 100644
--- a/apps/www/components/Sections/ProductsCta2.tsx
+++ b/apps/www/components/Sections/ProductsCta2.tsx
@@ -5,6 +5,8 @@ import Link from 'next/link'
import React from 'react'
import { Button, cn } from 'ui'
+import { StartYourProjectButton } from '@/components/StartYourProjectButton'
+
export type Products = PRODUCT_SHORTNAMES
interface Props {
@@ -26,9 +28,9 @@ function ProductsCta(props: Props) {
Ready to start building?
-
+
+ Start for free
+
diff --git a/apps/www/components/StartYourProjectButton.tsx b/apps/www/components/StartYourProjectButton.tsx
new file mode 100644
index 00000000000..4dc263ffd06
--- /dev/null
+++ b/apps/www/components/StartYourProjectButton.tsx
@@ -0,0 +1,34 @@
+'use client'
+
+import { useIsLoggedIn } from 'common'
+import Link from 'next/link'
+import type { ComponentProps } from 'react'
+import { Button } from 'ui'
+
+import { getDashboardCtaHref } from '@/lib/dashboard-links'
+
+type StartYourProjectButtonProps = {
+ children?: React.ReactNode
+ onClick?: ComponentProps['onClick']
+ size?: ComponentProps['size']
+ variant?: ComponentProps['variant']
+ className?: string
+}
+
+export function StartYourProjectButton({
+ children = 'Start your project',
+ onClick,
+ size = 'medium',
+ variant,
+ className,
+}: StartYourProjectButtonProps) {
+ const isLoggedIn = useIsLoggedIn()
+
+ return (
+
+ )
+}
diff --git a/apps/www/data/solutions/agencies.tsx b/apps/www/data/solutions/agencies.tsx
index ff62db32131..dfb7ccd5c3b 100644
--- a/apps/www/data/solutions/agencies.tsx
+++ b/apps/www/data/solutions/agencies.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import {
ArrowLeftRight,
Check,
@@ -85,7 +86,7 @@ const data: {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as const,
},
{
diff --git a/apps/www/data/solutions/agents.tsx b/apps/www/data/solutions/agents.tsx
index 64f5725029e..df28ea71b52 100644
--- a/apps/www/data/solutions/agents.tsx
+++ b/apps/www/data/solutions/agents.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import {
Check,
ClipboardCheck,
@@ -91,7 +92,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/ai-builders.tsx b/apps/www/data/solutions/ai-builders.tsx
index 6c98074c4a8..594169e65af 100644
--- a/apps/www/data/solutions/ai-builders.tsx
+++ b/apps/www/data/solutions/ai-builders.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { Timer } from 'lucide-react'
import type {
@@ -39,7 +40,7 @@ const data: {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
},
{
diff --git a/apps/www/data/solutions/b2b-saas.tsx b/apps/www/data/solutions/b2b-saas.tsx
index 1971c2eaa00..ea9aa0971d6 100644
--- a/apps/www/data/solutions/b2b-saas.tsx
+++ b/apps/www/data/solutions/b2b-saas.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import {
Check,
@@ -91,7 +92,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/beginners.tsx b/apps/www/data/solutions/beginners.tsx
index fd74f32efdc..e67c94e7802 100644
--- a/apps/www/data/solutions/beginners.tsx
+++ b/apps/www/data/solutions/beginners.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import { Check, Sparkles, Timer } from 'lucide-react'
import dynamic from 'next/dynamic'
@@ -69,7 +70,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/developers.tsx b/apps/www/data/solutions/developers.tsx
index 2975760a26c..6b615404153 100644
--- a/apps/www/data/solutions/developers.tsx
+++ b/apps/www/data/solutions/developers.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import {
Check,
@@ -85,7 +86,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/finserv.tsx b/apps/www/data/solutions/finserv.tsx
index 60709494d23..32f724e4663 100644
--- a/apps/www/data/solutions/finserv.tsx
+++ b/apps/www/data/solutions/finserv.tsx
@@ -11,6 +11,7 @@ import {
Users,
UserX,
} from 'lucide-react'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { PRODUCT_SHORTNAMES } from 'shared-data/products'
import { Image } from 'ui-patterns/Image'
@@ -90,7 +91,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/hackathon.tsx b/apps/www/data/solutions/hackathon.tsx
index 7fc5f3517e5..79ff8271300 100644
--- a/apps/www/data/solutions/hackathon.tsx
+++ b/apps/www/data/solutions/hackathon.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import { Check, InfoIcon, Sparkles, Timer } from 'lucide-react'
import dynamic from 'next/dynamic'
@@ -65,7 +66,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/healthcare.tsx b/apps/www/data/solutions/healthcare.tsx
index c2616d4144e..6caf6f13cf0 100644
--- a/apps/www/data/solutions/healthcare.tsx
+++ b/apps/www/data/solutions/healthcare.tsx
@@ -10,6 +10,7 @@ import {
Users,
UserX,
} from 'lucide-react'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { Image } from 'ui-patterns/Image'
import { getSharedSections } from './shared-sections'
@@ -89,7 +90,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/hosted-postgres.tsx b/apps/www/data/solutions/hosted-postgres.tsx
index 4a6798134f4..0a64cbfe456 100644
--- a/apps/www/data/solutions/hosted-postgres.tsx
+++ b/apps/www/data/solutions/hosted-postgres.tsx
@@ -1,4 +1,5 @@
import { useBreakpoint } from 'common'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import {
Activity,
Blocks,
@@ -90,7 +91,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/innovation-teams.tsx b/apps/www/data/solutions/innovation-teams.tsx
index 8c663a3a677..8171da08384 100644
--- a/apps/www/data/solutions/innovation-teams.tsx
+++ b/apps/www/data/solutions/innovation-teams.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import {
ArrowLeftRight,
@@ -134,7 +135,7 @@ const data: () => {
ctas: [
{
label: 'Start Building',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
@@ -751,7 +752,7 @@ const data: () => {
description: 'Start free with any AI builder + Supabase',
cta: {
label: 'Create Your First App in 5 Minutes',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
},
},
{
diff --git a/apps/www/data/solutions/no-code.tsx b/apps/www/data/solutions/no-code.tsx
index 5a25f77e2f3..80c5ba8c36b 100644
--- a/apps/www/data/solutions/no-code.tsx
+++ b/apps/www/data/solutions/no-code.tsx
@@ -1,4 +1,5 @@
import { Check, PointerIcon, TrendingUp, ZapIcon } from 'lucide-react'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import dynamic from 'next/dynamic'
import { PRODUCT_SHORTNAMES } from 'shared-data/products'
import { cn } from 'ui'
@@ -54,7 +55,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/postgres-developers.tsx b/apps/www/data/solutions/postgres-developers.tsx
index f0c8b1d6e53..0cd374acaaf 100644
--- a/apps/www/data/solutions/postgres-developers.tsx
+++ b/apps/www/data/solutions/postgres-developers.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import {
Check,
@@ -85,7 +86,7 @@ const data: () => {
ctas: [
{
label: 'Start your project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/startups.tsx b/apps/www/data/solutions/startups.tsx
index 1106a1ed28b..7c08a8e5ee6 100644
--- a/apps/www/data/solutions/startups.tsx
+++ b/apps/www/data/solutions/startups.tsx
@@ -1,4 +1,5 @@
import { CubeIcon } from '@heroicons/react/outline'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { useBreakpoint } from 'common'
import {
Check,
@@ -85,7 +86,7 @@ const data: () => {
ctas: [
{
label: 'Get started with Supabase',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
onClick: () =>
sendTelemetryEvent({
diff --git a/apps/www/data/solutions/vibe-coders.tsx b/apps/www/data/solutions/vibe-coders.tsx
index aac037de93b..24d6c1b6f49 100644
--- a/apps/www/data/solutions/vibe-coders.tsx
+++ b/apps/www/data/solutions/vibe-coders.tsx
@@ -1,4 +1,5 @@
import { useBreakpoint } from 'common'
+import { DASHBOARD_SIGN_UP_URL } from '@/lib/dashboard-links'
import { Check, CheckCircle, Sparkles, Timer, Zap } from 'lucide-react'
import dynamic from 'next/dynamic'
import { PRODUCT_SHORTNAMES } from 'shared-data/products'
@@ -62,7 +63,7 @@ const useVibeCodersContent: () => {
ctas: [
{
label: 'Start Your Project',
- href: 'https://supabase.com/dashboard',
+ href: DASHBOARD_SIGN_UP_URL,
type: 'primary' as any,
},
],
diff --git a/apps/www/lib/dashboard-links.ts b/apps/www/lib/dashboard-links.ts
new file mode 100644
index 00000000000..f31852e4b99
--- /dev/null
+++ b/apps/www/lib/dashboard-links.ts
@@ -0,0 +1,16 @@
+export const DASHBOARD_URL = 'https://supabase.com/dashboard'
+export const DASHBOARD_SIGN_IN_URL = 'https://supabase.com/dashboard/sign-in'
+export const DASHBOARD_SIGN_UP_URL = 'https://supabase.com/dashboard/sign-up'
+
+/** Homepage/product "Start your project" CTA: sign-up for guests, dashboard for signed-in users. */
+export function getDashboardCtaHref(isLoggedIn: boolean): string {
+ return isLoggedIn ? DASHBOARD_URL : DASHBOARD_SIGN_UP_URL
+}
+
+const DASHBOARD_CTA_HREFS = new Set([DASHBOARD_URL, DASHBOARD_SIGN_UP_URL])
+
+/** Rewrite static dashboard/sign-up CTA hrefs when the visitor is already signed in. */
+export function resolveDashboardCtaHref(href: string, isLoggedIn: boolean): string {
+ if (!DASHBOARD_CTA_HREFS.has(href)) return href
+ return getDashboardCtaHref(isLoggedIn)
+}