Skip to content

Commit aba589e

Browse files
committed
Fix responsiveness issue with screen width resizing on dashboard and coaching session pages and their layouts
1 parent 465bde1 commit aba589e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/app/coaching-sessions/[id]/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export default function CoachingSessionLayout({
1818
}>) {
1919
return (
2020
<SidebarProvider>
21-
<div className="flex min-h-screen min-w-full">
21+
<div className="flex min-h-screen w-full">
2222
<AppSidebar />
23-
<SidebarInset>
23+
<SidebarInset className="min-w-0">
2424
<SiteHeader />
25-
<main>{children}</main>
25+
<main className="min-w-0">{children}</main>
2626
</SidebarInset>
2727
</div>
2828
</SidebarProvider>

src/app/dashboard/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export default function DashboardLayout({
1919
}>) {
2020
return (
2121
<SidebarProvider>
22-
<div className="flex min-h-screen min-w-full">
22+
<div className="flex min-h-screen w-full">
2323
<AppSidebar />
24-
<SidebarInset>
24+
<SidebarInset className="min-w-0">
2525
<SiteHeader />
26-
<main className="flex-1 p-6">{children}</main>
26+
<main className="flex-1 p-6 min-w-0">{children}</main>
2727
<Toaster />
2828
</SidebarInset>
2929
</div>

src/components/ui/page-container.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export function PageContainer({
1414
"p-4",
1515
// Mobile: stack vertically
1616
"flex flex-col gap-6",
17-
// Never grow wider than the site-header
18-
"max-w-screen-2xl",
19-
// Ensure full width for children
17+
// Constrain width to a reasonable maximum while allowing flexibility
18+
"w-full max-w-screen-2xl mx-auto",
19+
// Ensure children respect the container width
2020
"[&>*]:w-full"
2121
)}
2222
>

src/components/ui/site-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { UserNav } from "@/components/ui/user-nav";
77

88
export function SiteHeader() {
99
return (
10-
<header className="sticky top-0 z-50 w-full max-w-screen-2xl border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
11-
<div className="flex h-14 pl-4 pt-2 max-w-screen-2xl items-start">
10+
<header className="sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
11+
<div className="flex h-14 pl-4 pt-2 w-full max-w-screen-2xl mx-auto items-start">
1212
<MainNav />
1313
<div className="flex flex-1 items-center justify-between space-x-2 md:justify-end">
1414
{/* <div className="w-full flex-1 md:w-auto md:flex-none">

0 commit comments

Comments
 (0)