diff options
author | Viktor Vorona <viktor.vorona@sonarsource.com> | 2024-08-07 10:42:24 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-08-26 20:03:05 +0000 |
commit | 764e818569f3328a3d39470ec54837b52117dea5 (patch) | |
tree | 532358d9a703869ab8ba24d74f5fd32a7388b600 /server/sonar-web/src/main/js/apps/settings | |
parent | 28ff86fcd8312d8e6b61a679106df554bcea072d (diff) | |
download | sonarqube-764e818569f3328a3d39470ec54837b52117dea5.tar.gz sonarqube-764e818569f3328a3d39470ec54837b52117dea5.zip |
SONAR-22697 RatingsComponent POC
Diffstat (limited to 'server/sonar-web/src/main/js/apps/settings')
3 files changed, 9 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx index d8379e27c81..c8180e203fc 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.tsx @@ -57,7 +57,10 @@ export default function Definition(props: Readonly<Props>) { const [success, setSuccess] = React.useState(false); const [changedValue, setChangedValue] = React.useState<FieldValue>(); const [validationMessage, setValidationMessage] = React.useState<string>(); - const { data: loadedSettingValue, isLoading } = useGetValueQuery(definition.key, component?.key); + const { data: loadedSettingValue, isLoading } = useGetValueQuery({ + key: definition.key, + component: component?.key, + }); const settingValue = isLoading ? initialSettingValue : loadedSettingValue ?? undefined; const { mutateAsync: resetSettingValue } = useResetSettingsMutation(); diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx index f6c20eaa44b..85281797e08 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/AutoProvisionningConsent.tsx @@ -44,7 +44,7 @@ export default function AutoProvisioningConsent(props: Readonly<Props>) { const { mutate: updateGithubConfig } = useUpdateGitHubConfigurationMutation(); const { mutate: updateGitlabConfig } = useUpdateGitLabConfigurationMutation(); - const { data: userConsent } = useGetValueQuery(CONSENT_SETTING_KEY); + const { data: userConsent } = useGetValueQuery({ key: CONSENT_SETTING_KEY }); const { mutateAsync: resetSettingValue } = useResetSettingsMutation(); if ( diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx index 138817182b1..06a2ed8703d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/BitbucketAuthenticationTab.tsx @@ -37,10 +37,10 @@ interface Props { export default function BitbucketAuthenticationTab(props: Readonly<Props>) { const { definitions } = props; - const { data: allowToSignUpEnabled } = useGetValueQuery( - 'sonar.auth.bitbucket.allowUsersToSignUp', - ); - const { data: workspaces } = useGetValueQuery('sonar.auth.bitbucket.workspaces'); + const { data: allowToSignUpEnabled } = useGetValueQuery({ + key: 'sonar.auth.bitbucket.allowUsersToSignUp', + }); + const { data: workspaces } = useGetValueQuery({ key: 'sonar.auth.bitbucket.workspaces' }); const isConfigurationUnsafe = allowToSignUpEnabled?.value === 'true' && |