mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix build
This commit is contained in:
parent
7b297c53c8
commit
b34d29c5e4
2 changed files with 18 additions and 23 deletions
|
|
@ -35,7 +35,6 @@ export default function RootLayout({
|
|||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const isMaintenanceMode = process.env.MAINTENANCE_MODE === 'true';
|
||||
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
|
|
@ -60,26 +59,22 @@ export default function RootLayout({
|
|||
</head>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
||||
{isMaintenanceMode ? (
|
||||
children
|
||||
) : (
|
||||
<AuthProvider>
|
||||
<AppConfigProvider>
|
||||
<Suspense fallback={<SpinLoader />}>
|
||||
<UserConfigProvider>
|
||||
<OnboardingProvider>
|
||||
<PostHogIdentify />
|
||||
<AppLayout>
|
||||
{children}
|
||||
</AppLayout>
|
||||
<Toaster />
|
||||
<ChatwootWidget />
|
||||
</OnboardingProvider>
|
||||
</UserConfigProvider>
|
||||
</Suspense>
|
||||
</AppConfigProvider>
|
||||
</AuthProvider>
|
||||
)}
|
||||
<AuthProvider>
|
||||
<AppConfigProvider>
|
||||
<Suspense fallback={<SpinLoader />}>
|
||||
<UserConfigProvider>
|
||||
<OnboardingProvider>
|
||||
<PostHogIdentify />
|
||||
<AppLayout>
|
||||
{children}
|
||||
</AppLayout>
|
||||
<Toaster />
|
||||
<ChatwootWidget />
|
||||
</OnboardingProvider>
|
||||
</UserConfigProvider>
|
||||
</Suspense>
|
||||
</AppConfigProvider>
|
||||
</AuthProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ const AppLayout: React.FC<AppLayoutProps> = ({
|
|||
const pathname = usePathname();
|
||||
|
||||
// Check if current route should have sidebar
|
||||
// Hide sidebar for root (/) and /handler routes (Stack Auth routes)
|
||||
const shouldShowSidebar = pathname !== "/" && !pathname.startsWith("/handler");
|
||||
// Hide sidebar for root (/), /handler routes (Stack Auth routes), and /maintenance
|
||||
const shouldShowSidebar = pathname !== "/" && !pathname.startsWith("/handler") && pathname !== "/maintenance";
|
||||
|
||||
// Check if we're in workflow editor mode or superadmin runs - collapse sidebar by default
|
||||
const isWorkflowEditor = /^\/workflow\/\d+/.test(pathname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue