Files
lms-sb/src/app/(student)/tools/layout.tsx
T
adminsandClaude Opus 4.8 39e2102a18 Gate Obsidian Toolbox behind TOOLBOX_VISIBLE flag
Toolbox is still being refined; hide it from clients on prod while keeping it
usable on staging. Entry points (header link, dashboard card) render only when
TOOLBOX_VISIBLE=true; a tools/layout redirects /tools/* to /dashboard otherwise.
Routes and ToolUsage table are untouched (no destructive migration).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 12:15:42 +05:00

9 lines
454 B
TypeScript

import { redirect } from "next/navigation";
// Toolbox ещё в доработке: на проде скрыт (флаг не задан) — прямой заход на
// /tools/* уводит на дашборд. На staging выставлен TOOLBOX_VISIBLE=true.
export default function ToolsLayout({ children }: { children: React.ReactNode }) {
if (process.env.TOOLBOX_VISIBLE !== "true") redirect("/dashboard");
return <>{children}</>;
}