mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-28 08:49:42 +02:00
chore: refactor setup scrpts (#288)
* refactor setup scrpts * update docker compose to use dograh-init * avoid creating unnecessary conf files * fix local setup script * add agents.md
This commit is contained in:
parent
4ff1f576f0
commit
87699f2dee
18 changed files with 1321 additions and 1178 deletions
|
|
@ -62,15 +62,13 @@ const AppLayout: React.FC<AppLayoutProps> = ({
|
|||
// Hide sidebar for root (/), /handler routes (Stack Auth routes), and /auth routes
|
||||
const shouldShowSidebar = pathname !== "/" && !pathname.startsWith("/handler") && !pathname.startsWith("/auth");
|
||||
|
||||
// Check if we're in workflow editor mode or superadmin runs - collapse sidebar by default
|
||||
// Only match the exact editor page /workflow/<id>, not sub-routes like /workflow/<id>/runs
|
||||
const isWorkflowEditor = /^\/workflow\/\d+$/.test(pathname);
|
||||
const isSuperadmin = pathname.startsWith("/superadmin");
|
||||
|
||||
// Always render SidebarProvider to keep the component tree shape consistent
|
||||
// across route changes (avoids React hooks ordering violations during navigation).
|
||||
return (
|
||||
<SidebarProvider defaultOpen={!isWorkflowEditor && !isSuperadmin}>
|
||||
<SidebarProvider defaultOpen>
|
||||
{shouldShowSidebar ? (
|
||||
<div className="flex min-h-screen w-full">
|
||||
<AppSidebar />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue