Files
sfera-new/src/app/page.tsx

25 lines
547 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"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>
)
}