Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Nov 14, 2024
1 parent d19e7dc commit 6872c00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/src/pages/docs/usage/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ const locale = await getLocale();
Depending on how a component renders, the returned locale corresponds to:

1. **Server Components**: The locale represents the value returned in [`i18n/request.ts`](#i18n-request).
2. **Client Components**: In this case, the locale is received from [`NextIntlClientProvider`](#nextintlclientprovider). Note that `NextIntlClientProvider` automatically inherits the locale if it is rendered by a Server Component.
2. **Client Components**: The locale is received from [`NextIntlClientProvider`](#nextintlclientprovider).

Note that `NextIntlClientProvider` automatically inherits the locale if it is rendered by a Server Component, therefore you rarely need to pass a locale to `NextIntlClientProvider` yourself.

</Details>

Expand Down
3 changes: 2 additions & 1 deletion packages/next-intl/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ export default (await getPresets('typescript', 'react', 'vitest')).concat({
{
paths: [
{
// Two reasons:
// Because:
// - Avoid hardcoding the `locale` param
// - Prepare for a new API in Next.js to read params deeply
// - Avoid issues with `dynamicIO`
name: 'next/navigation.js',
importNames: ['useParams']
}
Expand Down

0 comments on commit 6872c00

Please sign in to comment.