|
1 | | -import { ArrowLeft, CircleX, ExternalLink, Loader2, Plug, Trash2 } from "lucide-react"; |
2 | | -import { Link, useNavigate, useParams } from "react-router-dom"; |
3 | | -import { useState, useEffect, useMemo } from "react"; |
| 1 | +import type { ConfigurationField } from "@/api-client"; |
| 2 | +import { PermissionTooltip } from "@/components/PermissionGate"; |
| 3 | +import { Button } from "@/components/ui/button"; |
| 4 | +import { Input } from "@/components/ui/input"; |
| 5 | +import { Label } from "@/components/ui/label"; |
| 6 | +import { usePermissions } from "@/contexts/PermissionsContext"; |
4 | 7 | import { |
5 | 8 | useAvailableIntegrations, |
6 | 9 | useDeleteIntegration, |
7 | 10 | useIntegration, |
8 | 11 | useUpdateIntegration, |
9 | 12 | } from "@/hooks/useIntegrations"; |
10 | | -import { Button } from "@/components/ui/button"; |
11 | | -import { Input } from "@/components/ui/input"; |
12 | | -import { Label } from "@/components/ui/label"; |
| 13 | +import { Alert, AlertDescription } from "@/ui/alert"; |
| 14 | +import { IntegrationIcon } from "@/ui/componentSidebar/integrationIcons"; |
13 | 15 | import { ConfigurationFieldRenderer } from "@/ui/configurationFieldRenderer"; |
14 | | -import type { ConfigurationField } from "@/api-client"; |
15 | | -import { showErrorToast, showSuccessToast } from "@/utils/toast"; |
| 16 | +import { IntegrationInstructions } from "@/ui/IntegrationInstructions"; |
16 | 17 | import { getApiErrorMessage } from "@/utils/errors"; |
17 | 18 | import { getIntegrationTypeDisplayName } from "@/utils/integrationDisplayName"; |
18 | | -import { IntegrationIcon } from "@/ui/componentSidebar/integrationIcons"; |
19 | | -import { IntegrationInstructions } from "@/ui/IntegrationInstructions"; |
20 | | -import { PermissionTooltip } from "@/components/PermissionGate"; |
21 | | -import { usePermissions } from "@/contexts/PermissionsContext"; |
22 | | -import { Alert, AlertDescription } from "@/ui/alert"; |
| 19 | +import { showErrorToast, showSuccessToast } from "@/utils/toast"; |
| 20 | +import { ArrowLeft, CircleX, ExternalLink, Loader2, Plug, Trash2 } from "lucide-react"; |
| 21 | +import { useEffect, useMemo, useState } from "react"; |
| 22 | +import { Link, useNavigate, useParams } from "react-router-dom"; |
23 | 23 | import { renderIntegrationMetadata } from "./integrationMetadataRenderers"; |
24 | 24 |
|
25 | 25 | interface IntegrationDetailsProps { |
@@ -155,7 +155,7 @@ export function IntegrationDetails({ organizationId }: IntegrationDetailsProps) |
155 | 155 | } |
156 | 156 | }; |
157 | 157 |
|
158 | | - const handleBrowserAction = async () => { |
| 158 | + const handleBrowserAction = () => { |
159 | 159 | if (!integration?.status?.browserAction) return; |
160 | 160 |
|
161 | 161 | const { url, method, formFields } = integration.status.browserAction; |
@@ -186,13 +186,6 @@ export function IntegrationDetails({ organizationId }: IntegrationDetailsProps) |
186 | 186 | window.open(url, "_blank"); |
187 | 187 | } |
188 | 188 | } |
189 | | - |
190 | | - // Trigger a resync with installed=true so the backend transitions to ready |
191 | | - try { |
192 | | - await updateMutation.mutateAsync({ configuration: { ...configValues, installed: "true" } }); |
193 | | - } catch { |
194 | | - // Resync is best-effort |
195 | | - } |
196 | 189 | }; |
197 | 190 |
|
198 | 191 | const handleDelete = async () => { |
|
0 commit comments