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