From fc6adaf16ec5304c6fce3e6dd8fcfc5265acd831 Mon Sep 17 00:00:00 2001
From: Moheeb Zara
Date: Wed, 5 Aug 2026 00:02:35 -0700
Subject: [PATCH] fix(landing): let signed-in users browse the marketing site
instead of bouncing to /dashboard
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The homepage hard-redirected any authenticated visitor straight to /dashboard,
so clicking the wordmark/home (or opening / while signed in) never showed the
public site — and would block the public docs section too. Drop the redirect and
make the nav, hero, and closing CTAs auth-aware: signed-in visitors get a
"Dashboard" button; signed-out visitors get "Log in" / "Get started".
---
app/(landing)/page.tsx | 48 ++++++++++++++++++++++++++++++------------
1 file changed, 35 insertions(+), 13 deletions(-)
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
+ >
+ )}