Open LeakedDave opened 4 hours ago
I determined that the issue is actually due to using 'next/navigation' useRouter instead of 'next/router' which only works for App Router, not Pages Router. I don't think wrapping the NextJS Router can work to support both App Router and Pages Router projects
Description
I think this bug is due to useMemo on createNavigation or something, but I am losing everything on the native NextJS router when I use next-intl useRouter. I can't access router.query, and router.replace doesn't let you hide query parameters from the URL (e.g. router.replace("login?returnTo=/edit-profile", "/login"))
Verifications
Mandatory reproduction URL
https://github.com/amannn/next-intl
Reproduction description
Thanks
Expected behaviour
Thanks