Description
If a basePath is configured in the nextConfig it gets lost with router.push. With a Link it works fine.
Mandatory reproduction URL
https://codesandbox.io/p/devbox/great-jerry-s6ylgc
Reproduction description
Steps to reproduce:
- Open reproduction
- You should be now on
/base-path/de
- Click on Link
- you are now on
/base-path/de/test-page
- go back
- Click on Router Push
- you are now on
/base-path/test-page
Expected behaviour
If using router.push in combination with basePath the locale should also be carried with.
Description
If a
basePathis configured in thenextConfigit gets lost withrouter.push. With aLinkit 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-pageExpected behaviour
If using
router.pushin combination withbasePaththe locale should also be carried with.