Skip to content

Commit 0803716

Browse files
[docs] Fix broken link to Next.js docs
1 parent cbb6f8d commit 0803716

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/data/joy/customization/dark-mode/dark-mode.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,21 +115,21 @@ export default class MyDocument extends Document {
115115

116116
### Next.js App Router
117117

118-
To use the Joy UI API with a Next.js project with the App Router, add the following code to the [`app/layout.js`](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#layouts) file in order to prevent flickering:
118+
To use the Joy UI API with a Next.js project with the App Router, add the following code to the [root layout](https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates#root-layout-required) file in order to prevent flickering:
119119

120-
```jsx title="layout.js"
120+
```jsx title="app/layout.js"
121121
import InitColorSchemeScript from '@mui/joy/InitColorSchemeScript';
122122
import { CssVarsProvider } from '@mui/joy/styles';
123123
import CssBaseline from '@mui/joy/CssBaseline';
124124

125-
export default function RootLayout({ children }) {
125+
export default function RootLayout(props) {
126126
return (
127127
<html lang="en" suppressHydrationWarning={true}>
128128
<body>
129129
<InitColorSchemeScript />
130130
<CssVarsProvider>
131131
<CssBaseline />
132-
{children}
132+
{props.children}
133133
</CssVarsProvider>
134134
</body>
135135
</html>

docs/data/material/customization/css-theme-variables/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,18 @@ The `attribute` has to be the same as the one you set in the `colorSchemeSelecto
197197

198198
### Next.js App Router
199199

200-
Add the following code to the [root layout](https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#root-layout-required) file:
200+
Add the following code to the [root layout](https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates#root-layout-required) file:
201201

202202
```jsx title="app/layout.js"
203203
import InitColorSchemeScript from '@mui/material/InitColorSchemeScript';
204204

205-
export default function RootLayout({ children }) {
205+
export default function RootLayout(props) {
206206
return (
207207
<html lang="en">
208208
<body>
209209
{/* must come before the <main> element */}
210210
<InitColorSchemeScript attribute=".mode-%s" />
211-
<main>{children}</main>
211+
<main>{props.children}</main>
212212
</body>
213213
</html>
214214
);

0 commit comments

Comments
 (0)