Skip to content

Commit 8176795

Browse files
committed
fix(platform): say why nothing connects in Emir's empty state, not a second list line
A managed or unconnectable app added its reason as another muted line under the credential list's empty text. The list keeps Emir's anatomy, and an app with nothing connected and a reason reads his member page's empty state: No connected credentials, with the reason as its description.
1 parent bdad787 commit 8176795

2 files changed

Lines changed: 14 additions & 22 deletions

File tree

‎apps/sim/app/(product)/o/[organizationId]/integrations/_components/credential-list/credential-list.tsx‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ type CredentialListProps = {
1212
*/
1313
providerId: string
1414
credentials: readonly IntegrationCredential[]
15-
/** Why the viewer cannot connect a credential, read beneath an empty list. */
16-
emptyNotice?: string
1715
} & (
1816
| {
1917
/** Each row's own address, so a live row is a link as legacy's was. */
@@ -26,7 +24,6 @@ type CredentialListProps = {
2624
export function CredentialList({
2725
providerId,
2826
credentials,
29-
emptyNotice,
3027
credentialHref,
3128
onOpen,
3229
}: CredentialListProps) {
@@ -58,16 +55,9 @@ export function CredentialList({
5855
)}
5956
</ul>
6057
) : (
61-
<>
62-
<p className={styles.empty} data-type='T060'>
63-
No connected credentials
64-
</p>
65-
{emptyNotice && (
66-
<p className={styles.empty} data-type='T060'>
67-
{emptyNotice}
68-
</p>
69-
)}
70-
</>
58+
<p className={styles.empty} data-type='T060'>
59+
No connected credentials
60+
</p>
7161
)}
7262
</section>
7363
)

‎apps/sim/app/(product)/o/[organizationId]/integrations/_components/live-integration-details/live-integration-details.tsx‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface LiveIntegrationDetailsProps {
4343
* the organization manages, no Connect shows.
4444
*/
4545
unavailableReason?: string
46-
/** Why the viewer cannot connect their own credential, beneath an empty list. */
46+
/** Why the viewer cannot connect their own credential, said in place of an empty list. */
4747
emptyNotice?: string
4848
pending: boolean
4949
/** The open credential's page; `disconnect` asks before removing it. */
@@ -153,14 +153,16 @@ export function LiveIntegrationDetails({
153153
)
154154
)}
155155
</ControlBar>
156-
{credentials && (
157-
<CredentialList
158-
providerId={app.providerId}
159-
credentials={credentials}
160-
credentialHref={credentialHref}
161-
emptyNotice={emptyNotice}
162-
/>
163-
)}
156+
{credentials &&
157+
(!credentials.length && emptyNotice ? (
158+
<EmptyState title='No connected credentials' description={emptyNotice} />
159+
) : (
160+
<CredentialList
161+
providerId={app.providerId}
162+
credentials={credentials}
163+
credentialHref={credentialHref}
164+
/>
165+
))}
164166
{capabilities}
165167
</>
166168
)

0 commit comments

Comments
 (0)