chore(layout): remove overflow

This commit is contained in:
Aslam H
2024-09-11 19:30:01 +07:00
5 changed files with 102 additions and 4 deletions

View File

@@ -3,6 +3,8 @@
import { Sidebar } from "@/components/custom/sidebar/sidebar"
import { CommandPalette } from "@/components/custom/command-palette/command-palette"
import { useAccountOrGuest } from "@/lib/providers/jazz-provider"
import SlidingMenu from "@/components/ui/sliding-menu"
import { LearnAnythingOnboarding } from "@/components/custom/learn-anything-onboarding"
export default function PageLayout({ children }: { children: React.ReactNode }) {
const { me } = useAccountOrGuest()
@@ -10,10 +12,12 @@ export default function PageLayout({ children }: { children: React.ReactNode })
return (
<div className="flex h-full min-h-full w-full flex-row items-stretch overflow-hidden">
<Sidebar />
<LearnAnythingOnboarding />
{me._type !== "Anonymous" && <CommandPalette />}
<div className="flex min-w-0 flex-1 flex-col">
<div className="relative flex min-w-0 flex-1 flex-col">
<SlidingMenu />
<main className="relative flex flex-auto flex-col place-items-stretch lg:my-2 lg:mr-2 lg:rounded-md lg:border">
{children}
</main>

View File

@@ -10,7 +10,6 @@ import { DeepLinkProvider } from "@/lib/providers/deep-link-provider"
import { GeistMono, GeistSans } from "./fonts"
import { JazzAndAuth } from "@/lib/providers/jazz-provider"
import { TooltipProvider } from "@/components/ui/tooltip"
import { LearnAnythingOnboarding } from "@/components/custom/learn-anything-onboarding"
export const metadata: Metadata = {
title: "Learn Anything",
@@ -43,7 +42,7 @@ export default function RootLayout({
<body className={cn("h-full w-full font-sans antialiased", GeistSans.variable, GeistMono.variable)}>
<Providers>
{children}
<LearnAnythingOnboarding />
<Toaster expand={false} />
</Providers>
</body>