diff options
author | Viktor Vorona <viktor.vorona@sonarsource.com> | 2023-08-10 17:12:59 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-08-11 20:02:49 +0000 |
commit | 344e16be5060c96fceb39ee737dd7604ed6d717d (patch) | |
tree | 2899a2f35629019bab1dededb20e452fc12b4f38 /server/sonar-web/src/main/js/apps/projectsManagement | |
parent | fc14589ce7a24ca782b09ac3d34fb5f9bfe4bff1 (diff) | |
download | sonarqube-344e16be5060c96fceb39ee737dd7604ed6d717d.tar.gz sonarqube-344e16be5060c96fceb39ee737dd7604ed6d717d.zip |
SONAR-20122 Move react-queries to common folder
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectsManagement')
3 files changed, 6 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx index 0a6c7791a2d..685629bb3bb 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx @@ -23,8 +23,8 @@ import Radio from '../../components/controls/Radio'; import { Button, ResetButtonLink } from '../../components/controls/buttons'; import { Alert } from '../../components/ui/Alert'; import { translate } from '../../helpers/l10n'; +import { useGithubProvisioningEnabledQuery } from '../../queries/identity-provider'; import { Visibility } from '../../types/component'; -import { useGithubStatusQuery } from '../settings/components/authentication/queries/identity-provider'; export interface Props { defaultVisibility: Visibility; @@ -34,7 +34,7 @@ export interface Props { export default function ChangeDefaultVisibilityForm(props: Props) { const [visibility, setVisibility] = useState(props.defaultVisibility); - const { data: githubProbivisioningEnabled } = useGithubStatusQuery(); + const { data: githubProbivisioningEnabled } = useGithubProvisioningEnabledQuery(); const handleConfirmClick = () => { props.onConfirm(visibility); diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx index d2acb3e932b..76fda3be051 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx @@ -27,9 +27,9 @@ import QualifierIcon from '../../components/icons/QualifierIcon'; import DateFormatter from '../../components/intl/DateFormatter'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { getComponentOverviewUrl } from '../../helpers/urls'; +import { useGithubProvisioningEnabledQuery } from '../../queries/identity-provider'; import { ComponentQualifier } from '../../types/component'; import { LoggedInUser } from '../../types/users'; -import { useGithubStatusQuery } from '../settings/components/authentication/queries/identity-provider'; import './ProjectRow.css'; import ProjectRowActions from './ProjectRowActions'; @@ -42,7 +42,7 @@ interface Props { export default function ProjectRow(props: Props) { const { currentUser, project, selected } = props; - const { data: githubProvisioningEnabled } = useGithubStatusQuery(); + const { data: githubProvisioningEnabled } = useGithubProvisioningEnabledQuery(); const handleProjectCheck = (checked: boolean) => { props.onProjectCheck(project, checked); diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx index 032e81f83f2..26d929bcc01 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/ProjectRowActions.tsx @@ -24,9 +24,9 @@ import ActionsDropdown, { ActionsDropdownItem } from '../../components/controls/ import DeferredSpinner from '../../components/ui/DeferredSpinner'; import { translate, translateWithParameters } from '../../helpers/l10n'; import { getComponentPermissionsUrl } from '../../helpers/urls'; +import { useGithubProvisioningEnabledQuery } from '../../queries/identity-provider'; import { LoggedInUser } from '../../types/users'; import ApplyTemplate from '../permissions/project/components/ApplyTemplate'; -import { useGithubStatusQuery } from '../settings/components/authentication/queries/identity-provider'; import RestoreAccessModal from './RestoreAccessModal'; export interface Props { @@ -39,7 +39,7 @@ export default function ProjectRowActions({ currentUser, project }: Props) { const [hasAccess, setHasAccess] = useState<boolean | undefined>(undefined); const [loading, setLoading] = useState(false); const [restoreAccessModal, setRestoreAccessModal] = useState(false); - const { data: githubProvisioningEnabled } = useGithubStatusQuery(); + const { data: githubProvisioningEnabled } = useGithubProvisioningEnabledQuery(); const fetchPermissions = () => { setLoading(true); |