mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 19:26:07 +00:00
fix(integrations): resolved integration bot deactive revoke bug
This commit is contained in:
@@ -85,7 +85,13 @@ export const IntegrationsPage = withProjectPermission(
|
|||||||
// details: so onsuccessfully deleting an integration auth, immediately integration list is refeteched
|
// details: so onsuccessfully deleting an integration auth, immediately integration list is refeteched
|
||||||
// After the refetch is completed check if its empty. Then set bot active and reset the submit hook
|
// After the refetch is completed check if its empty. Then set bot active and reset the submit hook
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isDeleteIntegrationAuthSuccess && !isIntegrationFetching && !integrations?.length) {
|
if (
|
||||||
|
isDeleteIntegrationAuthSuccess &&
|
||||||
|
!isIntegrationFetching &&
|
||||||
|
!isIntegrationAuthLoading &&
|
||||||
|
!integrations?.length &&
|
||||||
|
!integrationAuths?.length
|
||||||
|
) {
|
||||||
if (bot?._id)
|
if (bot?._id)
|
||||||
updateBotActiveStatusSync({
|
updateBotActiveStatusSync({
|
||||||
isActive: false,
|
isActive: false,
|
||||||
@@ -94,7 +100,13 @@ export const IntegrationsPage = withProjectPermission(
|
|||||||
});
|
});
|
||||||
resetDeleteIntegrationAuth();
|
resetDeleteIntegrationAuth();
|
||||||
}
|
}
|
||||||
}, [isIntegrationFetching, isDeleteIntegrationAuthSuccess, integrations?.length]);
|
}, [
|
||||||
|
isIntegrationFetching,
|
||||||
|
isDeleteIntegrationAuthSuccess,
|
||||||
|
isIntegrationAuthLoading,
|
||||||
|
integrationAuths?.length,
|
||||||
|
integrations?.length
|
||||||
|
]);
|
||||||
|
|
||||||
const handleProviderIntegration = async (provider: string) => {
|
const handleProviderIntegration = async (provider: string) => {
|
||||||
const selectedCloudIntegration = cloudIntegrations?.find(({ slug }) => provider === slug);
|
const selectedCloudIntegration = cloudIntegrations?.find(({ slug }) => provider === slug);
|
||||||
|
|||||||
Reference in New Issue
Block a user