- {account.enrollmentStatus === 'revoked' ? 'Access revoked' : account.status}
-
- }
- trailing={
-
-
- reconnect.mutate(account.credentialId, {
- onSuccess: ({ invitationLink }) => {
- window.location.assign(invitationLink)
- },
- })
- }
- >
- Reconnect
-
- {
- disconnect.reset()
- setDisconnectingId(account.credentialId)
- }}
- >
- Disconnect
-
-
- }
- />
- ))
- )}
- {accounts.data?.pages[0]?.accounts.length === 0 && (
-
- You haven’t contributed accounts to an organization yet. Use your invitation link to get
- started.
-
- )}
- {accounts.hasNextPage && (
-
- void accounts.fetchNextPage()}
- >
- Load more
-
-
- )}
- {disconnectingAccount && (
- {
- if (!open && !disconnect.isPending) setDisconnectingId(null)
- }}
- title={`Disconnect ${disconnectingAccount.displayName}`}
- text={`${disconnectingAccount.organizationName} will stop indexing and running workflows with this account. You will lose Search access that depends on this connection.`}
- defaultAction='none'
- confirm={{
- label: 'Disconnect',
- pendingLabel: 'Disconnecting…',
- pending: disconnect.isPending,
- variant: 'destructive',
- onClick: () =>
- disconnect.mutate(disconnectingAccount.credentialId, {
- onSuccess: () => {
- setDisconnectingId(null)
- toast.success('Account disconnected')
- },
- }),
- }}
- >
- {disconnect.error?.message}
-
- )}
-