"use client" import { useEffect } from "react" import { useRouter } from "next/navigation" import { useAuth } from "@/lib/auth-context" export default function HomePage() { const { isAuthenticated, loading } = useAuth() const router = useRouter() useEffect(() => { if (loading) return if (isAuthenticated) { router.replace("/dashboard/precios") } else { router.replace("/login") } }, [isAuthenticated, loading, router]) return (
) }