From 4c6ff1ab0f0cd394167b21bdf8aa903b9ef5385d Mon Sep 17 00:00:00 2001 From: Michele Date: Sat, 31 Jan 2026 13:37:59 +0100 Subject: [PATCH] feat(01-05): update home page with auth-aware redirect - Redirect authenticated users to dashboard - Show landing page with value proposition for visitors - Add clear CTAs for register and login - Italian copy reflecting core product value Co-Authored-By: Claude Opus 4.5 --- src/app/page.tsx | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 2b14b73..540fcb3 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,8 +1,47 @@ -export default function Home() { +import { createClient } from '@/lib/supabase/server' +import { redirect } from 'next/navigation' +import Link from 'next/link' +import { Button } from '@/components/ui/button' + +export default async function Home() { + const supabase = await createClient() + const { data: { user } } = await supabase.auth.getUser() + + // If logged in, redirect to dashboard + if (user) { + redirect('/dashboard') + } + + // Landing page for non-authenticated users return ( -
-

Leopost

-

Setup in corso...

+
+
+

+ Leopost +

+

+ Il tuo social media manager potenziato dall'AI. +
+ Minimo sforzo, massima resa. +

+ +
+ + + + + + +
+ +

+ Nessuna carta richiesta. Piano gratuito disponibile. +

+
) }