mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-19 01:50:51 -05:00
fix(connectors): hide the account fold button with no saved accounts (#16002)
This commit is contained in:
1 parent
2bc4e46511
commit
1cfaacf913
1 file changed
+17
-13
+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>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user