File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
app/organizations/[id]/members Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import "@/styles/globals.css";
33import { siteConfig } from "@/site.config.ts" ;
44
55import { SiteHeader } from "@/components/ui/site-header" ;
6+ import { SidebarInset , SidebarProvider } from "@/components/ui/sidebar" ;
7+ import { AppSidebar } from "@/components/ui/app-sidebar" ;
68export const metadata : Metadata = {
79 title : siteConfig . name ,
810 description : "Manage coaching members" ,
@@ -14,11 +16,14 @@ export default function MembersLayout({
1416 children : React . ReactNode ;
1517} > ) {
1618 return (
17- // Ensure that SiteHeader has enough vertical space to stay sticky at the top
18- // of the page by using "min-h-screen" in the parent div
19- < div className = "min-h-screen" >
20- < SiteHeader />
21- < main > { children } </ main >
22- </ div >
19+ < SidebarProvider >
20+ < div className = "flex min-h-screen min-w-full" >
21+ < AppSidebar />
22+ < SidebarInset >
23+ < SiteHeader />
24+ < main className = "flex-1 p-6" > { children } </ main >
25+ </ SidebarInset >
26+ </ div >
27+ </ SidebarProvider >
2328 ) ;
2429}
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 SidebarRail ,
2121 SidebarSeparator ,
2222} from "@/components/ui/sidebar" ;
23+ import { useOrganizationStateStore } from "@/lib/providers/organization-state-store-provider" ;
2324
2425// Custom styles for menu buttons to ensure consistent centering
2526const menuButtonStyles = {
@@ -30,6 +31,8 @@ const menuButtonStyles = {
3031} ;
3132
3233export function AppSidebar ( { ...props } : React . ComponentProps < typeof Sidebar > ) {
34+ const { currentOrganizationId } = useOrganizationStateStore ( ( state ) => state ) ;
35+
3336 return (
3437 < Sidebar collapsible = "icon" { ...props } >
3538 < SidebarHeader className = "h-16 flex flex-col justify-between pb-0" >
@@ -101,7 +104,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
101104 menuButtonStyles . buttonCollapsed
102105 ) }
103106 >
104- < a href = "/ members" >
107+ < a href = { `/organizations/ ${ currentOrganizationId } / members` } >
105108 < span className = { menuButtonStyles . iconWrapper } >
106109 < Users className = "h-4 w-4" />
107110 </ span >
You can’t perform that action at this time.
0 commit comments