import { redirect } from "next/navigation"; import { currentOperator } from "@/lib/ops/session"; import { Rail } from "./Rail"; /* Everything in this group needs a signed-in operator. The sign-in page sits outside the group * so it is reachable without one. The proxy already turned away requests with no valid tc_ops * cookie; this re-reads the row, so a deactivated operator or a changed password ends the * session here even if the token still verifies. */ export const dynamic = "force-dynamic"; export default async function ConsoleLayout({ children }: { children: React.ReactNode }) { const op = await currentOperator(); if (!op) redirect("/ops/login"); return (