fix: opt Next.js out of smooth scroll for route transitions

Adds data-scroll-behavior="smooth" to <html> so Next disables the global
scroll-behavior during programmatic route-change scrolls while keeping
smooth behavior for user-driven anchor jumps. Silences the Next 15 warning.
This commit is contained in:
Ilia Mashkov
2026-05-22 15:30:42 +03:00
parent 5b686ad87c
commit a31cf4deec
+1 -1
View File
@@ -14,7 +14,7 @@ export const metadata: Metadata = {
*/ */
export default function RootLayout({ children }: { children: React.ReactNode }) { export default function RootLayout({ children }: { children: React.ReactNode }) {
return ( return (
<html lang="en"> <html lang="en" data-scroll-behavior="smooth">
<body className={`${fraunces.variable} ${publicSans.variable} pb-footer md:pb-footer-wide`}> <body className={`${fraunces.variable} ${publicSans.variable} pb-footer md:pb-footer-wide`}>
{children} {children}
<Footer /> <Footer />