Skip to content

Commit 149bcbe

Browse files
authored
chore(docs): update with-i18n-routing.mdx
1 parent 1c67ab7 commit 149bcbe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/src/pages/docs/getting-started/app-router/with-i18n-routing.mdx

+3-5
Original file line numberDiff line numberDiff line change
@@ -220,17 +220,15 @@ const withNextIntl = createNextIntlPlugin(
220220
The `locale` that was matched by the middleware is available via the `locale` param and can be used to configure the document language. Additionally, we can use this place to pass configuration from `i18n/request.ts` to Client Components via `NextIntlClientProvider`.
221221

222222
```tsx filename="app/[locale]/layout.tsx"
223-
import {NextIntlClientProvider, Locale, hasLocale} from 'next-intl';
223+
import {NextIntlClientProvider, hasLocale} from 'next-intl';
224224
import {notFound} from 'next/navigation';
225225
import {routing} from '@/i18n/routing';
226+
import type { PropsWithChildren } from 'react';
226227

227228
export default async function LocaleLayout({
228229
children,
229230
params
230-
}: {
231-
children: React.ReactNode;
232-
params: Promise<{locale: string}>;
233-
}) {
231+
}: PropsWithChildren<{ readonly params: Promise<{ locale: string }> }) {
234232
// Ensure that the incoming `locale` is valid
235233
const {locale} = await params;
236234
if (!hasLocale(routing.locales, locale)) {

0 commit comments

Comments
 (0)