fix(connectors): hide the account fold button with no saved accounts (#16002)

This commit is contained in:
Raunak Bhagat authored and GitHub committed 2026-10-14 02:11:33 +00:00
1 parent 2bc4e46511
commit 1cfaacf913
1 file changed
+17 -13
@@ -495,19 +495,23 @@ export default function AuthenticationAccountSection({
width="fit"
/>
</Section>
<Button
icon={accountsExpanded ? SvgFold : SvgExpand}
prominence="tertiary"
aria-label={
accountsExpanded
? t("add.savedAccounts.collapseButton.ariaLabel")
: t("add.savedAccounts.expandButton.ariaLabel")
}
aria-expanded={accountsExpanded}
onClick={() =>
accountsExpanded ? foldAccounts() : setAccountsExpanded(true)
}
/>
{/* Folding hides the saved accounts that are not the pick; with
none, it would do nothing, so the button is left out. */}
{(credentials?.length ?? 0) > 0 && (
<Button
icon={accountsExpanded ? SvgFold : SvgExpand}
prominence="tertiary"
aria-label={
accountsExpanded
? t("add.savedAccounts.collapseButton.ariaLabel")
: t("add.savedAccounts.expandButton.ariaLabel")
}
aria-expanded={accountsExpanded}
onClick={() =>
accountsExpanded ? foldAccounts() : setAccountsExpanded(true)
}
/>
)}
</Section>
}
/>