Skip to content

Commit

Permalink
Don't modify head tag in next app router example
Browse files Browse the repository at this point in the history
The [Next docs for app router] say that the `<head>` tag shouldn't be modified manually.

One repercussion of ignoring this advice is that Cypress e2e tests don't work anymore when testing app router based Next app where the `<head>` tag was modified manually.

So I think the Mantine docs shouldn't propose doing this.

As far as I can tell, the `<ColorSchemeScript />` works fine when put in the `<body>`.
  • Loading branch information
moritzreiter authored Nov 6, 2023
1 parent b10a096 commit d29ceff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/pages/guides/next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,8 @@ export const metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<ColorSchemeScript />
</head>
<body>
<ColorSchemeScript />
<MantineProvider>{children}</MantineProvider>
</body>
</html>
Expand Down

0 comments on commit d29ceff

Please sign in to comment.