Integration page can update to empty array (#5593)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
* Bug fix: Integrations page updates to 0 integrations when the last integration is removed
|
||||
@@ -82,6 +82,8 @@ const IntegrationsPage = (): JSX.Element => {
|
||||
return { ...integration, index };
|
||||
});
|
||||
setIntegrationsIndexed(addIndex);
|
||||
} else {
|
||||
setIntegrationsIndexed([]);
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -195,6 +197,7 @@ const IntegrationsPage = (): JSX.Element => {
|
||||
Successfully deleted <b>{integrationEditing.url}</b>
|
||||
</>
|
||||
);
|
||||
refetchIntegrations();
|
||||
})
|
||||
.catch(() => {
|
||||
renderFlash(
|
||||
@@ -206,7 +209,6 @@ const IntegrationsPage = (): JSX.Element => {
|
||||
);
|
||||
})
|
||||
.finally(() => {
|
||||
refetchIntegrations();
|
||||
toggleDeleteIntegrationModal();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user