diff --git a/app/(landing)/page.tsx b/app/(landing)/page.tsx index 3aa2409..1fcc14c 100644 --- a/app/(landing)/page.tsx +++ b/app/(landing)/page.tsx @@ -1,5 +1,4 @@ import Link from 'next/link' -import { redirect } from 'next/navigation' import { createClient } from '@/lib/supabase/server' import { BrandMark } from '@/components/brand-mark' import { GithubIcon, ArrowIcon } from '@/components/landing/icons' @@ -30,10 +29,11 @@ const STEPS = [ export default async function LandingPage() { // `/` resolves here (route group adds no path segment), so this page is // wrapped by (landing)/layout.tsx which supplies the .landing-root theme, - // fonts, and landing.css. Logged-in visitors skip the marketing page. + // fonts, and landing.css. Signed-in visitors can still browse the marketing + // site and docs; their CTAs point to the dashboard instead of signup/login. const supabase = await createClient() const { data: { user } } = await supabase.auth.getUser() - if (user) redirect('/dashboard') + const signedIn = !!user return ( <> @@ -54,8 +54,14 @@ export default async function LandingPage() { > - Log in - Get started + {signedIn ? ( + Dashboard + ) : ( + <> + Log in + Get started + + )} @@ -73,10 +79,18 @@ export default async function LandingPage() { people who keep them running.

- - Get started - - Log in + {signedIn ? ( + + Go to dashboard + + ) : ( + <> + + Get started + + Log in + + )}
@@ -132,10 +146,18 @@ export default async function LandingPage() {

Stop running your space from memory.

- - Get started - - Log in + {signedIn ? ( + + Go to dashboard + + ) : ( + <> + + Get started + + Log in + + )}

Not running a space? Read the{' '}