Simplify homepage to static (debug SSR issue)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,8 @@
|
|||||||
import { createClient } from '@/lib/supabase/server'
|
|
||||||
import { redirect } from 'next/navigation'
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
|
|
||||||
export default async function Home() {
|
export default function Home() {
|
||||||
const supabase = await createClient()
|
// Simple static landing page - no Supabase for now
|
||||||
const { data: { user } } = await supabase.auth.getUser()
|
|
||||||
|
|
||||||
// If logged in, redirect to dashboard
|
|
||||||
if (user) {
|
|
||||||
redirect('/dashboard')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Landing page for non-authenticated users
|
|
||||||
return (
|
return (
|
||||||
<main className="min-h-screen flex flex-col items-center justify-center p-8 bg-gradient-to-b from-blue-50 to-white">
|
<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">
|
<div className="text-center max-w-2xl">
|
||||||
@@ -26,12 +16,12 @@ export default async function Home() {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="flex gap-4 justify-center">
|
<div className="flex gap-4 justify-center">
|
||||||
<Link href="/register">
|
<Link href="/register/">
|
||||||
<Button size="lg">
|
<Button size="lg">
|
||||||
Inizia gratis
|
Inizia gratis
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href="/login">
|
<Link href="/login/">
|
||||||
<Button variant="outline" size="lg">
|
<Button variant="outline" size="lg">
|
||||||
Accedi
|
Accedi
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user