-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Persisting searchParams on swithch locale #550
Comments
Thank you for the bug report! I've just fixed this in |
Thank you for an amazing library <3 |
Thanks @madaher-dev, this comment just helped me solve how to correctly handle query params in my @amannn would you like me to make a PR to update the example here or somewhere else in the repo? More than happy to do so 🤗 |
Sounds like a good idea, thanks! Would you mind updating the corresponding expandable section in the |
Hello, your job is really amazing. But it does not redirect me well. Have you got solution ? |
Description
I am building a nexts app using the app router. I followed the same setup as in https://next-intl-docs.vercel.app/examples/app-router
Everything is working fine untill i wanted to persist the searchParamas (i use the paramas to persist some state)
I modified the LocaleSwitcher in the example with the following code
Now if i am on this page http://localhost:30002/?location=test&city=Beirut¤cy=USD and switch to Arabic i am routed normally to http://localhost:30002/ar?location=test&city=Beirut¤cy=USD
But if i want to switch back to english i am routed to http://localhost:30002/en?location=test&city=Beirut¤cy=USD
and the page give
This page isn’t working localhost redirected you too many times
I tried removing the page.jsx outside the locale router that has a redirect but i get same results
Also please note that http://localhost:30002/?location=test&city=Beirut¤cy=USD works fine
Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://github.com/advanced-digital-technologies/lokalee-new-web/tree/staging
Reproduction description
Steps to reproduce:
Expected behaviour
http://localhost:30002/en?location=test&city=Beirut¤cy=USD should redirect to http://localhost:30002/?location=test&city=Beirut¤cy=USD
The text was updated successfully, but these errors were encountered: