Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prefer locale from NextIntlClientProvider when using useLocale in Client Components. useParams().locale is still used as a fallback. #691

Merged
merged 3 commits into from
Dec 5, 2023

Conversation

amannn
Copy link
Owner

@amannn amannn commented Dec 5, 2023

Fixes #688

…ale` in Client Components. `useParams().locale` is still used as the fallback.
Copy link

vercel bot commented Dec 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2023 9:49am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2023 9:49am

@amannn amannn changed the title fix: Prefer locale from NextIntlClientProvider when using useLocale in Client Components. useParams().locale is still used as the fallback. fix: Prefer locale from NextIntlClientProvider when using useLocale in Client Components. useParams().locale is still used as a fallback. Dec 5, 2023
@amannn amannn marked this pull request as ready for review December 5, 2023 09:53
@amannn amannn merged commit e00ed97 into main Dec 5, 2023
6 checks passed
@amannn amannn deleted the fix/688-prefer-client-context-use-locale branch December 5, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useLocale returns locale from path params instead of provider value in client components
1 participant