import { Link, Outlet, useLocation } from "@remix-run/react"; import { cn } from "~/lib/utils"; import { AdminPageTitle } from "~/components/admin/DataTable"; const TABS = [ { label: "نمای کلی", to: "/admin/ledger", exact: true }, { label: "برداشتها", to: "/admin/ledger/payouts" }, { label: "تراکنشها", to: "/admin/ledger/transactions" }, { label: "دفتر روزنامه", to: "/admin/ledger/journal" }, { label: "فروشندگان", to: "/admin/ledger/sellers" }, ]; export default function LedgerLayout() { const loc = useLocation(); const active = (t: (typeof TABS)[number]) => t.exact ? loc.pathname === t.to : loc.pathname.startsWith(t.to); return (