Skip to content

Commit

Permalink
fix: locale route navigate should use the location hash
Browse files Browse the repository at this point in the history
KK-1153
  • Loading branch information
nikomakela committed May 16, 2024
1 parent 5ed3149 commit 1dd7c92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/domain/app/routes/useLocaleRouteNavigate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const useLocaleRouteNavigate = () => {
const shouldPrefixPathnameWithLocale =
!isSupportedLocale(locale) && isSupportedLocale(currentLocale);
if (shouldPrefixPathnameWithLocale) {
const redirectUrl = `/${currentLocale}${location.pathname}${location.search}`;
const redirectUrl = `/${currentLocale}${location.pathname}${location.hash}${location.search}`;
// eslint-disable-next-line no-console
console.info('Navigate to', redirectUrl);
navigate(redirectUrl, {
Expand Down

0 comments on commit 1dd7c92

Please sign in to comment.