@@ -18,7 +18,8 @@ import {
1818 Sheet ,
1919 SheetClose ,
2020 SheetContent ,
21- SheetDescription ,
21+ SheetFooter ,
22+ SheetHeader ,
2223 SheetTitle ,
2324 SheetTrigger ,
2425} from "@/components/ui/sheet" ;
@@ -31,8 +32,8 @@ export function MobileNav() {
3132
3233 return (
3334 < >
34- { /* Tap-to-dismiss overlay: modal={false} allows Clerk popups to work (they render
35- outside Sheet), but disables SheetOverlay dismiss. See authenticated.mobile.spec.ts */ }
35+ { /* modal={false} allows Clerk popups to work (they render outside Sheet), but
36+ disables SheetOverlay dismiss. See authenticated.mobile.spec.ts */ }
3637 { open && (
3738 < button
3839 type = "button"
@@ -61,21 +62,16 @@ export function MobileNav() {
6162 MOBILE_NAV_MAX_WIDTH ,
6263 ) }
6364 >
64- { /* Visually hidden title and description for accessibility */ }
65- < SheetTitle className = "sr-only" > Navigation menu</ SheetTitle >
66- < SheetDescription className = "sr-only" >
67- Browse site pages and manage your account
68- </ SheetDescription >
65+ < SheetHeader className = "flex-row items-center p-0" >
66+ < SheetTitle className = "sr-only" > Mobile navigation menu</ SheetTitle >
67+ < SheetClose asChild >
68+ < Link href = "/" className = "flex items-center" >
69+ < ThemeLogo />
70+ </ Link >
71+ </ SheetClose >
72+ </ SheetHeader >
6973
70- { /* Logo */ }
71- < SheetClose asChild >
72- < Link href = "/" className = "flex items-center" >
73- < ThemeLogo />
74- </ Link >
75- </ SheetClose >
76-
77- { /* Navigation Links */ }
78- < nav className = "flex flex-col gap-3 pt-4" >
74+ < nav className = "flex flex-1 flex-col gap-3 pt-5" >
7975 { NAV_LINKS . map ( ( link ) => (
8076 < SheetClose key = { link . route } asChild >
8177 < NavLink
@@ -87,21 +83,20 @@ export function MobileNav() {
8783 ) ) }
8884 </ nav >
8985
90- { /* Avatar - Only when signed in */ }
91- < SignedIn >
92- < div className = "mt-auto" >
93- < UserButton />
94- </ div >
95- </ SignedIn >
96-
97- { /* Auth Buttons - Only when signed out */ }
98- < SignedOut >
99- < div className = "mt-auto flex flex-col gap-3" >
86+ < SheetFooter className = "gap-3 p-0 pb-4" >
87+ < SignedIn >
88+ < UserButton
89+ appearance = { {
90+ elements : { userButtonAvatarBox : "size-10" } ,
91+ } }
92+ />
93+ </ SignedIn >
94+ < SignedOut >
10095 < SignInButton >
10196 < Button
10297 variant = "soft"
10398 size = "lg"
104- className = "w-full"
99+ className = "w-full text-base "
105100 onClick = { ( ) => setOpen ( false ) }
106101 >
107102 < span className = "bg-(image:--gradient-primary) bg-clip-text text-transparent" >
@@ -113,14 +108,14 @@ export function MobileNav() {
113108 < Button
114109 variant = "muted"
115110 size = "lg"
116- className = "w-full"
111+ className = "w-full text-base "
117112 onClick = { ( ) => setOpen ( false ) }
118113 >
119114 Sign up
120115 </ Button >
121116 </ SignUpButton >
122- </ div >
123- </ SignedOut >
117+ </ SignedOut >
118+ </ SheetFooter >
124119 </ SheetContent >
125120 </ Sheet >
126121 </ >
0 commit comments