diff --git a/apps/studio/components/layouts/DefaultLayout.tsx b/apps/studio/components/layouts/DefaultLayout.tsx index 1bf21f72f49..a397f020c8a 100644 --- a/apps/studio/components/layouts/DefaultLayout.tsx +++ b/apps/studio/components/layouts/DefaultLayout.tsx @@ -4,6 +4,8 @@ import { PropsWithChildren, ReactNode } from 'react' import { LayoutHeader } from './ProjectLayout/LayoutHeader' import NavigationBar from './ProjectLayout/NavigationBar/NavigationBar' import MobileNavigationBar from './ProjectLayout/NavigationBar/MobileNavigationBar' +import { ProjectContextProvider } from './ProjectLayout/ProjectContext' +import { useParams } from 'common' export interface DefaultLayoutProps { title?: string @@ -16,25 +18,28 @@ export interface DefaultLayoutProps { } const DefaultLayout = ({ children, showProductMenu }: PropsWithChildren) => { + const { ref } = useParams() return ( <> - -
- {/* Top Banner */} - -
- - + + +
+ {/* Top Banner */} + +
+ + +
+ {/* Main Content Area */} +
+ {/* Sidebar */} + + {/* Main Content */} +
{children}
+
- {/* Main Content Area */} -
- {/* Sidebar */} - - {/* Main Content */} -
{children}
-
-
- + + ) } diff --git a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx index f4d06e49826..64add79fe34 100644 --- a/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx +++ b/apps/studio/components/layouts/ProjectLayout/ProjectLayout.tsx @@ -128,121 +128,119 @@ const ProjectLayout = forwardRef - - - - {title - ? `${title} | Supabase` - : selectedTable - ? `${selectedTable} | ${projectName} | ${organizationName} | Supabase` - : projectName - ? `${projectName} | ${organizationName} | Supabase` - : organizationName - ? `${organizationName} | Supabase` - : 'Supabase'} - - - -
- - {showProductMenu && productMenu && ( - - {sideBarIsOpen && ( - - - - {productMenu} - - - - )} - - )} - {showProductMenu && productMenu && sideBarIsOpen && ( - - )} - - - -
+ + {title + ? `${title} | Supabase` + : selectedTable + ? `${selectedTable} | ${projectName} | ${organizationName} | Supabase` + : projectName + ? `${projectName} | ${organizationName} | Supabase` + : organizationName + ? `${organizationName} | Supabase` + : 'Supabase'} + + + +
+ + {showProductMenu && productMenu && ( + + {sideBarIsOpen && ( + + - {showPausedState ? ( -
-
- -
-
- ) : ( - - - {children} - - )} -
-
- {isClient && aiAssistantPanel.open && ( - <> - - - - - - )} -
+ {productMenu} + + + + )}
-
-
- - - - - {productMenu} - -
+ )} + {showProductMenu && productMenu && sideBarIsOpen && ( + + )} + + + +
+ {showPausedState ? ( +
+
+ +
+
+ ) : ( + + + {children} + + )} +
+
+ {isClient && aiAssistantPanel.open && ( + <> + + + + + + )} +
+
+ +
+ + + + + {productMenu} + ) }