aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2022-06-13 11:39:21 +0200
committersonartech <sonartech@sonarsource.com>2022-06-28 20:02:53 +0000
commit54732569670fc345367062d5b20fcca83d9f7692 (patch)
tree8a3d86a9b76fbc056b74ac68ff8b38db9cee2cb1 /server/sonar-web/src/main/js/apps/quality-profiles/utils.ts
parent26675093303e38f1973f3ee9da5750aeeb2a5a5f (diff)
downloadsonarqube-54732569670fc345367062d5b20fcca83d9f7692.tar.gz
sonarqube-54732569670fc345367062d5b20fcca83d9f7692.zip
SONAR-16045 Migrate react-router to 6.3.0
Co-authored-by: Jeremy Davis <jeremy.davis@sonarsource.com> Co-authored-by: Guillaume Péoc'h <guillaume.peoch@sonarsource.com>
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-profiles/utils.ts')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/utils.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts b/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts
index 7e3040f20fd..5bed7860f04 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/utils.ts
@@ -21,6 +21,7 @@ import { differenceInYears } from 'date-fns';
import { sortBy } from 'lodash';
import { Profile as BaseProfile } from '../../api/quality-profiles';
import { isValidDate, parseDate } from '../../helpers/dates';
+import { queryToSearch } from '../../helpers/urls';
import { Profile } from './types';
export function sortProfiles(profiles: BaseProfile[]): Profile[] {
@@ -66,12 +67,12 @@ export const PROFILE_PATH = '/profiles';
export const getProfilesForLanguagePath = (language: string) => ({
pathname: PROFILE_PATH,
- query: { language }
+ search: queryToSearch({ language })
});
export const getProfilePath = (name: string, language: string) => ({
pathname: `${PROFILE_PATH}/show`,
- query: { name, language }
+ search: queryToSearch({ name, language })
});
export const getProfileComparePath = (name: string, language: string, withKey?: string) => {
@@ -81,7 +82,7 @@ export const getProfileComparePath = (name: string, language: string, withKey?:
}
return {
pathname: `${PROFILE_PATH}/compare`,
- query
+ search: queryToSearch(query)
};
};
@@ -101,6 +102,6 @@ export const getProfileChangelogPath = (
}
return {
pathname: `${PROFILE_PATH}/changelog`,
- query
+ search: queryToSearch(query)
};
};