Open Vahor opened 1 week ago
What version of this package are you using? 2.6.2
What happened?
In NextJS 15: https://nextjs.org/blog/next-15#async-request-apis-breaking-change params should be awaited.
and currently that's not the case: https://github.com/aralroca/next-translate-plugin/blob/99c1faefcd7167a7caa309f2affc7d0d807a76e4/src/templateAppDir.ts#L102
What did you expect to happen?
params should be awaited. https://nextjs.org/docs/app/building-your-application/upgrading/version-15#params--searchparams example:
- const detectedLang = props.params?.lang ?? props.searchParams?.lang + const params = await props.params; + const searchParams = await props.searchParams; + const detectedLang = params?.lang ?? searchParams?.lang
Note: This might not be the only issue with next 15 as applying this patch does no fix all my issues.
TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.useContext) is not a function
Are you willing to submit a pull request to fix this bug? yes
Feel free to PR 👌😊
What version of this package are you using? 2.6.2
What happened?
In NextJS 15: https://nextjs.org/blog/next-15#async-request-apis-breaking-change params should be awaited.
and currently that's not the case: https://github.com/aralroca/next-translate-plugin/blob/99c1faefcd7167a7caa309f2affc7d0d807a76e4/src/templateAppDir.ts#L102
What did you expect to happen?
params should be awaited. https://nextjs.org/docs/app/building-your-application/upgrading/version-15#params--searchparams example:
Note: This might not be the only issue with next 15 as applying this patch does no fix all my issues.
TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.useContext) is not a function
Are you willing to submit a pull request to fix this bug? yes