Show custom success message from test result if present
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
03b241ec74
commit
bcd91f1c50
1 changed files with 2 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ function IntegrationCard({ integration, onSaved }: { integration: Integration; o
|
|||
const [changing, setChanging] = useState<Set<string>>(new Set())
|
||||
const [saving, setSaving] = useState(false)
|
||||
const [testing, setTesting] = useState(false)
|
||||
const [testResult, setTestResult] = useState<{ ok: boolean; error?: string } | null>(null)
|
||||
const [testResult, setTestResult] = useState<{ ok: boolean; error?: string; message?: string } | null>(null)
|
||||
const [enabled, setEnabled] = useState(integration.enabled)
|
||||
const [wfLocations, setWfLocations] = useState<{ id: string; name: string; short_name: string | null }[]>([])
|
||||
const [fetchingLocs, setFetchingLocs] = useState(false)
|
||||
|
|
@ -473,7 +473,7 @@ function IntegrationCard({ integration, onSaved }: { integration: Integration; o
|
|||
<span style={{ display: 'flex', alignItems: 'center', gap: '0.35rem', fontSize: '0.82rem',
|
||||
color: testResult.ok ? '#16a34a' : '#dc2626' }}>
|
||||
{testResult.ok
|
||||
? <><CheckCircle size={14} strokeWidth={1.75} /> Connected</>
|
||||
? <><CheckCircle size={14} strokeWidth={1.75} /> {testResult.message ?? 'Connected'}</>
|
||||
: <><XCircle size={14} strokeWidth={1.75} /> {testResult.error}</>
|
||||
}
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue