Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(layout): wrap children with LenisProvider for improved scrolling…
… experience
  • Loading branch information
arghyaxcodes committed Oct 29, 2025
commit 75d9854a13bd50978d087cddda9ed29ab2a7068c
3 changes: 2 additions & 1 deletion src/app/(site)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { baseOptions, linkItems } from "@/app/layout.config";
import { Footer } from "@/components/footer";
import { GitHubIcon } from "@/components/icons";
import LenisProvider from "@/components/providers/lenis-provider";
import { useDarkMode } from "@/hooks/useDarkMode";
import Link from "fumadocs-core/link";
import { HomeLayout } from "fumadocs-ui/layouts/home";
Expand Down Expand Up @@ -254,7 +255,7 @@ export default function SiteLayout({ children }: { children: ReactNode }) {
...linkItems,
]}
>
{children}
<LenisProvider>{children}</LenisProvider>
</HomeLayout>
<Footer />
</>
Expand Down
3 changes: 1 addition & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import LenisProvider from "@/components/providers/lenis-provider";
import SearchDialog from "@/components/search";
import { GoogleAnalytics } from "@next/third-parties/google";
import { RootProvider } from "fumadocs-ui/provider";
Expand Down Expand Up @@ -59,7 +58,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
SearchDialog,
}}
>
<LenisProvider>{children}</LenisProvider>
{children}
</RootProvider>
</body>
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS!} />
Expand Down
Loading