mirror of
https://github.com/fosrl/pangolin.git
synced 2026-09-08 04:02:54 +02:00
19 lines
413 B
TypeScript
19 lines
413 B
TypeScript
import { pullEnv } from "@app/lib/pullEnv";
|
|
import { build } from "@server/build";
|
|
import { redirect } from "next/navigation";
|
|
|
|
interface LayoutProps {
|
|
children: React.ReactNode;
|
|
params: Promise<{}>;
|
|
}
|
|
|
|
export default async function Layout(props: LayoutProps) {
|
|
const env = pullEnv();
|
|
|
|
if (build !== "saas" && !env.flags.useOrgOnlyIdp) {
|
|
redirect("/");
|
|
}
|
|
|
|
return props.children;
|
|
}
|