"use client"

import { useEffect } from "react"
import { useRouter } from "next/navigation"

export default function RootPage() {
  const router = useRouter()

  useEffect(() => {
    const host = window.location.hostname
    if (host.includes("simulacro")) {
      router.replace("/parent")
    } else {
      router.replace("/child")
    }
  }, [router])

  return null
}
