import { redirect } from "next/navigation"
import { isAdminUiEnabled } from "@/lib/server/admin-auth"

export default async function AdminLayout({
  children,
}: {
  children: React.ReactNode
}) {
  if (!isAdminUiEnabled()) {
    redirect("/")
  }

  return <>{children}</>
}
