Wire production domain, CORS for tenant subdomains, celery volume mounts, and nginx reverse proxy configs for apex, API, identity, auth, and wildcard tenants. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
637 B
TypeScript
22 lines
637 B
TypeScript
"use client";
|
|
|
|
import { ReactNode } from "react";
|
|
import { usePathname } from "next/navigation";
|
|
import { AdminAuthGuard } from "@/components/AdminAuthGuard";
|
|
import { AdminShell } from "@/components/admin/AdminShell";
|
|
|
|
export default function AdminLayout({ children }: { children: ReactNode }) {
|
|
const pathname = usePathname();
|
|
|
|
// صفحه ورود ادمین فقط redirect است و نباید داخل shell/guard قرار گیرد.
|
|
if (pathname === "/admin/login") {
|
|
return <>{children}</>;
|
|
}
|
|
|
|
return (
|
|
<AdminAuthGuard>
|
|
<AdminShell>{children}</AdminShell>
|
|
</AdminAuthGuard>
|
|
);
|
|
}
|