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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 (
|
||||
<main className="flex min-h-screen flex-col items-center justify-center p-24">
|
||||
<h1 className="text-4xl font-bold">Leopost</h1>
|
||||
<p className="mt-4 text-gray-600">Setup in corso...</p>
|
||||
<main className="min-h-screen flex flex-col items-center justify-center p-8 bg-gradient-to-b from-blue-50 to-white">
|
||||
<div className="text-center max-w-2xl">
|
||||
<h1 className="text-5xl font-bold text-gray-900 mb-4">
|
||||
Leopost
|
||||
</h1>
|
||||
<p className="text-xl text-gray-600 mb-8">
|
||||
Il tuo social media manager potenziato dall'AI.
|
||||
<br />
|
||||
Minimo sforzo, massima resa.
|
||||
</p>
|
||||
|
||||
<div className="flex gap-4 justify-center">
|
||||
<Link href="/register">
|
||||
<Button size="lg">
|
||||
Inizia gratis
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/login">
|
||||
<Button variant="outline" size="lg">
|
||||
Accedi
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<p className="mt-8 text-sm text-gray-500">
|
||||
Nessuna carta richiesta. Piano gratuito disponibile.
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user