Fix build error: move ViewTransitions inside body to fix 404 prerendering

ViewTransitions was wrapping the html element, which violates Next.js App
Router requirement that html and body be returned directly from root layout.
This caused prerendering of /404 to fail with Html import error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
bipproduction
2026-03-10 11:29:29 +08:00
parent fece983ac5
commit a4db3a149d

View File

@@ -99,13 +99,13 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<ViewTransitions>
<html lang="id" {...mantineHtmlProps}>
<head>
<meta charSet="utf-8" />
<ColorSchemeScript defaultColorScheme="light" />
</head>
<body>
<html lang="id" {...mantineHtmlProps}>
<head>
<meta charSet="utf-8" />
<ColorSchemeScript defaultColorScheme="light" />
</head>
<body>
<ViewTransitions>
<MusicProvider>
<MantineProvider theme={theme} defaultColorScheme="light">
{children}
@@ -117,8 +117,8 @@ export default function RootLayout({
/>
</MantineProvider>
</MusicProvider>
</body>
</html>
</ViewTransitions>
</ViewTransitions>
</body>
</html>
);
}