diff --git a/frontend/src/views/IntegrationsPage/IntegrationsPage.tsx b/frontend/src/views/IntegrationsPage/IntegrationsPage.tsx index fdc04af9d..fda0f6a1d 100644 --- a/frontend/src/views/IntegrationsPage/IntegrationsPage.tsx +++ b/frontend/src/views/IntegrationsPage/IntegrationsPage.tsx @@ -202,6 +202,8 @@ export const IntegrationsPage = withProjectPermission( integrations={integrations} environments={environments} onIntegrationDelete={({ _id: id }, cb) => handleIntegrationDelete(id, cb)} + isBotActive={bot?.isActive} + workspaceId={workspaceId} /> void) => void; + isBotActive: boolean | undefined; + workspaceId: string; }; export const IntegrationsSection = ({ integrations = [], environments = [], isLoading, - onIntegrationDelete + onIntegrationDelete, + isBotActive, + workspaceId }: Props) => { const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([ "deleteConfirmation" ] as const); - const { currentWorkspace } = useWorkspace(); - const { data: bot } = useGetWorkspaceBot(currentWorkspace?._id ?? ""); return (
@@ -53,12 +54,12 @@ export const IntegrationsSection = ({
)} - {!bot?.isActive && ( + {!isBotActive && (
All the active integrations will be disabled. Disable End-to-End Encryption in{" "} - + project settings to re-enable it . @@ -67,7 +68,7 @@ export const IntegrationsSection = ({
)} - {!isLoading && !integrations.length && bot?.isActive && ( + {!isLoading && !integrations.length && isBotActive && (
)} - {!isLoading && bot?.isActive && ( + {!isLoading && isBotActive && (
{integrations?.map((integration) => (