diff --git a/apps/masterbots.ai/app/c/layout.tsx b/apps/masterbots.ai/app/c/layout.tsx index e1c3eac5..d033d426 100644 --- a/apps/masterbots.ai/app/c/layout.tsx +++ b/apps/masterbots.ai/app/c/layout.tsx @@ -1,8 +1,6 @@ import { ChatLayoutSection } from '@/components/chat/chat-layout-section' import FooterCT from '@/components/footer-ct' import { ResponsiveSidebar } from '@/components/sidebar-responsive' -import { appConfig } from 'mb-env' -import { redirect } from 'next/navigation' import NextTopLoader from 'nextjs-toploader' interface ChatLayoutProps { @@ -10,11 +8,6 @@ interface ChatLayoutProps { } export default async function ChatLayout({ children }: ChatLayoutProps) { - if (!appConfig.devMode) { - console.error('Navigation to Pro is disabled. No access to this page') - redirect('/') - } - return (
diff --git a/apps/masterbots.ai/app/c/p/layout.tsx b/apps/masterbots.ai/app/c/p/layout.tsx index baa42ee5..46440b68 100644 --- a/apps/masterbots.ai/app/c/p/layout.tsx +++ b/apps/masterbots.ai/app/c/p/layout.tsx @@ -1,5 +1,7 @@ import { ChatLayoutSection } from '@/components/chat/chat-layout-section' import FooterCT from '@/components/footer-ct' +import { appConfig } from 'mb-env' +import { redirect } from 'next/navigation' import NextTopLoader from 'nextjs-toploader' interface ChatLayoutProps { @@ -7,6 +9,11 @@ interface ChatLayoutProps { } export default async function ChatLayout({ children }: ChatLayoutProps) { + if (!appConfig.devMode) { + console.error('Navigation to Pro is disabled. No access to this page') + redirect('/') + } + return (