"use client"

import { useEffect } from "react"
import { useRouter } from "next/navigation"
import { useAuth } from "@/hooks/useAuth"

export default function Home() {
  const router = useRouter()
  const { user } = useAuth()
  
  useEffect(() => {
    if (user) {
      router.replace('/dashboard')
    } else {
      router.replace('/login')
    }
  }, [router, user])

  return (
    <div className="min-h-screen bg-gradient-smooth flex items-center justify-center">
      <div className="text-white">Загрузка...</div>
    </div>
  )
}
