File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,12 @@ import { Link } from '@tanstack/react-router'
55import { Header } from './header'
66
77import { SidebarMenu } from '../components/menu/sidebar'
8+ import { ScrollArea } from '../components/ui/scroll-area'
89
910import logoLaucher from '../_assets/aerial-launcher.png'
1011
1112import { whatIsThis } from '../lib/callbacks'
13+ import { cn } from '../lib/utils'
1214
1315export function MainLayout ( { children } : PropsWithChildren ) {
1416 return (
@@ -34,8 +36,14 @@ export function MainLayout({ children }: PropsWithChildren) {
3436 </ div >
3537 < div className = "flex flex-col" >
3638 < Header />
37- < main className = "flex flex-col gap-4 h-[calc(100vh-var(--header-height))] overflow-y-auto p-4 relative lg:gap-6 lg:p-6" >
38- { children }
39+ < main className = "" >
40+ < ScrollArea
41+ viewportClassName = { cn (
42+ 'main-wrapper-content [&>div]:!flex [&>div]:flex-col [&>div]:gap-4 [&>div]:h-[calc(100vh-var(--header-height))] [&>div]:p-4 [&>div]:relative [&>div]:lg:gap-6 [&>div]:lg:p-6'
43+ ) }
44+ >
45+ { children }
46+ </ ScrollArea >
3947 </ main >
4048 </ div >
4149 </ div >
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function useScrollToTop() {
2929
3030 useEffect ( ( ) => {
3131 if ( ! $main . current ) {
32- $main . current = document . querySelector ( 'main' )
32+ $main . current = document . querySelector ( '. main-wrapper-content ' )
3333 }
3434
3535 $main . current ?. scroll ( {
You can’t perform that action at this time.
0 commit comments