toggle clients with feature flag

This commit is contained in:
miloschwartz
2025-06-26 15:09:16 -04:00
parent 7bf9cccbf6
commit 8f1cfd8037
9 changed files with 87 additions and 42 deletions

View File

@@ -0,0 +1,21 @@
import { redirect } from "next/navigation";
import { pullEnv } from "@app/lib/pullEnv";
export const dynamic = "force-dynamic";
interface SettingsLayoutProps {
children: React.ReactNode;
params: Promise<{ orgId: string }>;
}
export default async function SettingsLayout(props: SettingsLayoutProps) {
const params = await props.params;
const { children } = props;
const env = pullEnv();
if (!env.flags.enableClients) {
redirect(`/${params.orgId}/settings`);
}
return children;
}