-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Invalid typing of useCurrentLocale() #122
Comments
Thanks, I've just released 0.9.2 which fixes the type bug. You could already pass a config parameter but the type was wrong. |
Awesome! Thanks! In the same spirit, |
next-international/packages/next-international/src/app/server/create-get-static-params.ts Line 3 in 70bb097
|
It does, the key returned by each object in the array is In order for export function createGetStaticParams<Locales extends ImportedLocales>(locales: Locales) {
return function getStaticParams(config?: I18nCurrentLocaleConfig) {
return Object.keys(locales).map(locale => ({
[config?.segmentName ?? DEFAULT_SEGMENT_NAME]: locale,
}));
};
} |
Oh I understand what you mean now, sorry. I'll make another fix for it. |
Hi!
Thanks for the work here. I was just looking at the code and noticed that the
createUseCurrentLocale()
function insrc/app/client
has a return type that does not match the returned function (theconfig
parameter is missing). Is it intentional?If it is, how can we provide a custom segment name?
The text was updated successfully, but these errors were encountered: