What version of this package are you using?
3.0.0-canary.4
What operating system, Node.js, and npm version?
Mac OS, NodeJs, Yarn 3.6.4
What happened?
Using next-translate crashes global-error.tsx in the root of app router. The decorated component uses useParams which for some reason have null value in global-error.tsx (with use client directive) and when accessing lang property it crashes the page.
What version of this package are you using? 3.0.0-canary.4
What operating system, Node.js, and npm version? Mac OS, NodeJs, Yarn 3.6.4
What happened? Using
next-translate
crashesglobal-error.tsx
in the root ofapp router
. The decorated component usesuseParams
which for some reason havenull
value inglobal-error.tsx
(withuse client
directive) and when accessinglang
property it crashes the page.This line seems to be causing the issue https://github.com/aralroca/next-translate-plugin/blob/main/src/templateAppDir.ts#L162
What did you expect to happen? Page not to crash.
Are you willing to submit a pull request to fix this bug? I'm.