feat: moved more of isLoading to isPending

This commit is contained in:
=
2025-01-06 22:13:16 +05:30
parent 2fc6c564c0
commit d2d89034ba
29 changed files with 44 additions and 42 deletions
@@ -192,7 +192,7 @@ export const OverviewPage = () => {
environments: (userAvailableEnvs || []).map(({ slug }) => slug)
});
const { isLoading: isOverviewLoading, data: overview } = useGetProjectSecretsOverview(
const { isPending: isOverviewLoading, data: overview } = useGetProjectSecretsOverview(
{
projectId: workspaceId,
environments: visibleEnvs.map((env) => env.slug),
@@ -58,7 +58,7 @@ export const CreateSecretForm = ({ secretPath = "/", onClose }: Props) => {
const { mutateAsync: createSecretV3 } = useCreateSecretV3();
const { mutateAsync: createFolder } = useCreateFolder();
const { data: projectTags, isLoading: isTagsLoading } = useGetWsTags(
const { data: projectTags, isPending: isTagsLoading } = useGetWsTags(
canReadTags ? workspaceId : ""
);
@@ -56,7 +56,7 @@ export const CreateSecretForm = ({
const { permission } = useProjectPermission();
const canReadTags = permission.can(ProjectPermissionActions.Read, ProjectPermissionSub.Tags);
const { data: projectTags, isLoading: isTagsLoading } = useGetWsTags(
const { data: projectTags, isPending: isTagsLoading } = useGetWsTags(
canReadTags ? workspaceId : ""
);
@@ -35,7 +35,7 @@ export const EditDynamicSecretForm = ({
onClose,
secretPath
}: Props) => {
const { data: dynamicSecretDetails, isLoading: isDynamicSecretLoading } =
const { data: dynamicSecretDetails, isPending: isDynamicSecretLoading } =
useGetDynamicSecretDetails({
projectSlug,
environmentSlug: environment,
@@ -38,7 +38,7 @@ export const RotationOutputForm = ({ onSubmit, onCancel, outputSchema = {} }: Pr
const secretPath = watch("secretPath");
const selectedSecrets = watch("secrets");
const { data: secrets, isLoading: isSecretsLoading } = useGetProjectSecrets({
const { data: secrets, isPending: isSecretsLoading } = useGetProjectSecrets({
workspaceId,
environment,
secretPath
@@ -145,11 +145,11 @@ export const AwsSecretManagerConfigurePage = () => {
});
const { currentWorkspace } = useWorkspace();
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
const { data: integrationAuthAwsKmsKeys, isLoading: isIntegrationAuthAwsKmsKeysLoading } =
const { data: integrationAuthAwsKmsKeys, isPending: isIntegrationAuthAwsKmsKeysLoading } =
useGetIntegrationAuthAwsKmsKeys({
integrationAuthId: String(integrationAuthId),
region: selectedAWSRegion
@@ -38,11 +38,11 @@ export const DatabricksConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } =
const { data: integrationAuthScopes, isPending: isIntegrationAuthScopesLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -40,10 +40,10 @@ export const FlyioConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
const { data: integrationAuthApps = [], isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps = [], isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -82,7 +82,7 @@ export const GcpSecretManagerConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -148,7 +148,7 @@ export const GithubConfigurePage = () => {
});
const { data: integrationAuth } = useGetIntegrationAuthById(integrationAuthId);
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId
});
@@ -91,12 +91,12 @@ export const GitlabConfigurePage = () => {
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? "",
...(targetTeamId ? { teamId: targetTeamId } : {})
});
const { data: integrationAuthTeams, isLoading: isintegrationAuthTeamsLoading } =
const { data: integrationAuthTeams, isPending: isintegrationAuthTeamsLoading } =
useGetIntegrationAuthTeams((integrationAuthId as string) ?? "");
const [isLoading, setIsLoading] = useState(false);
@@ -66,7 +66,7 @@ export const HashicorpVaultConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isintegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
@@ -43,13 +43,13 @@ export const HasuraCloudConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
const selectedSourceEnvironment = watch("sourceEnvironment");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -61,7 +61,7 @@ export const HerokuConfigurePage = () => {
});
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -61,14 +61,14 @@ export const OctopusDeployConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: octopusDeploySpaces, isLoading: isLoadingOctopusDeploySpaces } =
const { data: octopusDeploySpaces, isPending: isLoadingOctopusDeploySpaces } =
useGetIntegrationAuthOctopusDeploySpaces((integrationAuthId as string) ?? "");
const currentSpace = watch("targetSpace", octopusDeploySpaces?.[0]);
const currentScope = watch("scope");
const sourceEnv = watch("sourceEnvironment");
const { data: octopusDeployResources, isLoading: isOctopusDeployResourcesLoading } =
const { data: octopusDeployResources, isPending: isOctopusDeployResourcesLoading } =
useGetIntegrationAuthApps(
{
integrationAuthId,
@@ -82,7 +82,7 @@ export const OctopusDeployConfigurePage = () => {
const currentResource = watch("targetResource", octopusDeployResources?.[0]);
const { data: octopusDeployScopeValues, isLoading: isOctopusDeployScopeValuesLoading } =
const { data: octopusDeployScopeValues, isPending: isOctopusDeployScopeValuesLoading } =
useGetIntegrationAuthOctopusDeployScopeValues(
{
integrationAuthId,
@@ -87,7 +87,7 @@ export const QoveryConfigurePage = () => {
});
const [targetEnvironmentId, setTargetEnvironmentId] = useState("");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthQoveryScopes({
integrationAuthId: (integrationAuthId as string) ?? "",
environmentId: targetEnvironmentId,
@@ -60,10 +60,10 @@ export const RenderConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -50,7 +50,7 @@ export const RundeckConfigurePage = () => {
select: (el) => el.integrationAuthId
});
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
@@ -40,10 +40,10 @@ export const TeamcityConfigurePage = () => {
const [secretPath, setSecretPath] = useState("/");
const [isLoading, setIsLoading] = useState(false);
const { data: integrationAuth, isLoading: isIntegrationAuthLoading } = useGetIntegrationAuthById(
const { data: integrationAuth, isPending: isIntegrationAuthLoading } = useGetIntegrationAuthById(
(integrationAuthId as string) ?? ""
);
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? ""
});
@@ -68,7 +68,7 @@ export const VercelConfigurePage = () => {
});
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
const { data: integrationAuthApps, isPending: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
integrationAuthId: (integrationAuthId as string) ?? "",
teamId: integrationAuth?.teamId as string