'use client'; import { useOllamaCheck } from "@/hooks/use-ollama-check"; import { Hero } from "@/components/landing/hero"; import { InstallModal } from "@/components/modals/install-modal"; import { StoppedCard } from "@/components/landing/stopped-card"; import { Loader2 } from "lucide-react"; import { useRouter } from "next/navigation"; export default function Home() { const { status, check } = useOllamaCheck(); const router = useRouter(); const handleStart = () => { const setupComplete = localStorage.getItem("ollahub_setup_complete"); if (setupComplete) { router.push("/chat"); } else { router.push("/setup"); } }; if (status === 'checking') { return (
Verificando sistema...
); } return (
{/* Layout for Running State */} {status === 'running' && ( )} {/* Layout for Stopped State */} {status === 'installed_stopped' && (

OllaHub

Detectamos o Ollama, mas ele não está rodando.

)} {/* Layout for Not Installed State (Background + Modal) */} {status === 'not_installed' && ( <>
{}} />
{/* Hero is shown in background, modal is open */} )}
); }