We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If a basePath is configured in the nextConfig it gets lost with router.push. With a Link it works fine.
basePath
nextConfig
router.push
Link
https://codesandbox.io/p/devbox/great-jerry-s6ylgc
Steps to reproduce:
/base-path/de
/base-path/de/test-page
/base-path/test-page
If using router.push in combination with basePath the locale should also be carried with.
The text was updated successfully, but these errors were encountered:
useRouter
+1
export const { Link, redirect, usePathname, useRouter } = createSharedPathnamesNavigation({ locales, localePrefix, }); export default function Page() { redirect("./profile"); }
it's not working with basePath config.
Sorry, something went wrong.
+1 redirect('/profile') it's not working with basePath config.
redirect('/profile') it's not working with basePath config.
redirect('/profile')
fix: Incorporate basePath correctly in useRouter functions (#906)
4abcbeb
Fixes #905 Fixes #910 --------- Co-authored-by: Jan Amann <[email protected]>
Successfully merging a pull request may close this issue.
Description
If a
basePath
is configured in thenextConfig
it gets lost withrouter.push
. With aLink
it works fine.Mandatory reproduction URL
https://codesandbox.io/p/devbox/great-jerry-s6ylgc
Reproduction description
Steps to reproduce:
/base-path/de
/base-path/de/test-page
/base-path/test-page
Expected behaviour
If using
router.push
in combination withbasePath
the locale should also be carried with.The text was updated successfully, but these errors were encountered: