mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 01:52:22 +00:00
Reduce page reloads for integrations page
This commit is contained in:
@@ -17,7 +17,7 @@ const deleteIntegration = ({ integrationId }: Props) =>
|
||||
}
|
||||
}).then(async (res) => {
|
||||
if (res && res.status === 200) {
|
||||
return (await res.json()).workspace;
|
||||
return (await res.json()).integration;
|
||||
}
|
||||
console.log('Failed to delete an integration');
|
||||
return undefined;
|
||||
|
||||
@@ -50,7 +50,7 @@ const updateIntegration = ({
|
||||
})
|
||||
}).then(async (res) => {
|
||||
if (res && res.status === 200) {
|
||||
return res;
|
||||
return (await res.json()).integration;
|
||||
}
|
||||
console.log('Failed to start an integration');
|
||||
return undefined;
|
||||
|
||||
@@ -226,7 +226,13 @@ export default function Integrations() {
|
||||
handleBotActivate={handleBotActivate}
|
||||
handleIntegrationOption={handleIntegrationOption}
|
||||
/> */}
|
||||
<IntegrationSection integrations={integrations} environments={environments} />
|
||||
<IntegrationSection
|
||||
integrations={integrations}
|
||||
setIntegrations={setIntegrations}
|
||||
bot={bot}
|
||||
setBot={setBot}
|
||||
environments={environments}
|
||||
/>
|
||||
{cloudIntegrationOptions.length > 0 && bot ? (
|
||||
<CloudIntegrationSection
|
||||
cloudIntegrationOptions={cloudIntegrationOptions}
|
||||
|
||||
Reference in New Issue
Block a user