Skip to content

Commit 587bd65

Browse files
authored
Merge pull request #770 from javaistic/fix/animation
Wrap children with LenisProvider for improved scrolling experience
2 parents 8d7605b + 75d9854 commit 587bd65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/(site)/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { baseOptions, linkItems } from "@/app/layout.config";
44
import { Footer } from "@/components/footer";
55
import { GitHubIcon } from "@/components/icons";
6+
import LenisProvider from "@/components/providers/lenis-provider";
67
import { useDarkMode } from "@/hooks/useDarkMode";
78
import Link from "fumadocs-core/link";
89
import { HomeLayout } from "fumadocs-ui/layouts/home";
@@ -254,7 +255,7 @@ export default function SiteLayout({ children }: { children: ReactNode }) {
254255
...linkItems,
255256
]}
256257
>
257-
{children}
258+
<LenisProvider>{children}</LenisProvider>
258259
</HomeLayout>
259260
<Footer />
260261
</>

src/app/layout.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import LenisProvider from "@/components/providers/lenis-provider";
21
import SearchDialog from "@/components/search";
32
import { GoogleAnalytics } from "@next/third-parties/google";
43
import { RootProvider } from "fumadocs-ui/provider";
@@ -59,7 +58,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
5958
SearchDialog,
6059
}}
6160
>
62-
<LenisProvider>{children}</LenisProvider>
61+
{children}
6362
</RootProvider>
6463
</body>
6564
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS!} />

0 commit comments

Comments
 (0)