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 { 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
|
||||
export default function Home() {
|
||||
// Simple static landing page - no Supabase for now
|
||||
return (
|
||||
<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">
|
||||
@@ -26,12 +16,12 @@ export default async function Home() {
|
||||
</p>
|
||||
|
||||
<div className="flex gap-4 justify-center">
|
||||
<Link href="/register">
|
||||
<Link href="/register/">
|
||||
<Button size="lg">
|
||||
Inizia gratis
|
||||
</Button>
|
||||
</Link>
|
||||
<Link href="/login">
|
||||
<Link href="/login/">
|
||||
<Button variant="outline" size="lg">
|
||||
Accedi
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user