MCPcopy Create free account
hub / github.com/ShipSecAI/studio / handleDisconnect

Function handleDisconnect

frontend/src/pages/IntegrationsManager.tsx:204–223  ·  view source on GitHub ↗
(connection: IntegrationConnection)

Source from the content-addressed store, hash-verified

202 };
203
204 const handleDisconnect = async (connection: IntegrationConnection) => {
205 resetError();
206 setDeletingConnectionId(connection.id);
207 try {
208 await disconnect(connection.id, userId);
209 toast({
210 title: 'Connection removed',
211 description: `${connection.providerName} credentials have been deleted.`,
212 });
213 } catch (err) {
214 const message = err instanceof Error ? err.message : 'Failed to disconnect';
215 toast({
216 title: 'Disconnect failed',
217 description: message,
218 variant: 'destructive',
219 });
220 } finally {
221 setDeletingConnectionId(null);
222 }
223 };
224
225 const handleManualReconnect = (connection: IntegrationConnection) => {
226 const provider = providers.find((item) => item.id === connection.provider);

Callers 1

IntegrationsManagerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected