-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Componet can't read translation context if use before children in layout.tsx - Next 13 app directory #7
Closed
marcelotk15 opened this issue
Feb 25, 2023
· 2 comments
· Fixed by #39 or aralroca/next-translate#1075
Closed
Componet can't read translation context if use before children in layout.tsx - Next 13 app directory #7
marcelotk15 opened this issue
Feb 25, 2023
· 2 comments
· Fixed by #39 or aralroca/next-translate#1075
Labels
Comments
Currently; layouts, loading, etc are not supported yet. Only page & subpage components. But should be great to support it soon. |
This was referenced May 18, 2023
This was referenced Jun 19, 2023
Layouts are supported in |
This was referenced Jun 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of this package are you using?
2.0.2 also
next-translate-plugin
What operating system, Node.js, and npm version?
OS: W11 with WSL1
Node: 16.17.1
NPM: 8.15.0
What happened?
If I use a component in the layout file before render the children they aren't able to read
lang
fromuseTranslation
.Showing the error.
https://app.birdeatsbug.com/sessions/7-srlQL9vr0fdUIJFU8ajxGiIymHBT-A4CEI3W3o-EYh
There is an error in console about that:
Warning: Prop `href` did not match. Server: "/en/second-page" Client: "//second-page"
When I click on the first he send me to
http://second-page/
and the second works fineCODES:
src/components/ShowTheError.tsx
src/app/layout.tsx
What did you expect to happen?
The componente can read the translation context.
Are you willing to submit a pull request to fix this bug?
Yes.
The text was updated successfully, but these errors were encountered: