🐛 Fix layout issues

This commit is contained in:
Luke Vella 2024-01-13 23:22:09 +07:00
parent 67a5dabdf0
commit dda1624dba
2 changed files with 6 additions and 4 deletions

View file

@ -55,11 +55,11 @@ export default async function Layout({
}) { }) {
function SidebarLayout() { function SidebarLayout() {
return ( return (
<div className="lg:flex h-full bg-gray-50"> <div className="bg-gray-50">
<MobileNavigation /> <MobileNavigation />
<div <div
className={cn( className={cn(
"hidden lg:flex lg:w-72 bg-gray-100 shrink-0 flex-col gap-y-5 overflow-y-auto border-r lg:px-6 lg:py-4 px-5 py-4", "hidden lg:flex z-50 inset-y-0 lg:fixed lg:w-72 bg-gray-100 shrink-0 flex-col gap-y-5 overflow-y-auto border-r lg:px-6 lg:py-4 px-5 py-4",
)} )}
> >
<div> <div>
@ -67,7 +67,9 @@ export default async function Layout({
</div> </div>
<Sidebar /> <Sidebar />
</div> </div>
<div className={cn("grow overflow-auto bg-gray-50")}>{children}</div> <div className={cn("grow overflow-auto lg:pl-72 bg-gray-50")}>
{children}
</div>
</div> </div>
); );
} }

View file

@ -26,7 +26,7 @@ export default function Root({
}) { }) {
return ( return (
<html lang={locale} className={inter.className}> <html lang={locale} className={inter.className}>
<body className="h-screen overflow-y-scroll"> <body>
<Toaster /> <Toaster />
<Providers>{children}</Providers> <Providers>{children}</Providers>
</body> </body>