Only show Switch menu items when more than 1 account

This commit is contained in:
Lim Chee Aun 2024-08-25 17:53:24 +08:00
parent 75853cd8e4
commit c3eb33e230

View file

@ -110,6 +110,8 @@ function Accounts({ onClose }) {
</button> </button>
} }
> >
{moreThanOneAccount && (
<>
<MenuItem <MenuItem
disabled={isCurrent} disabled={isCurrent}
onClick={() => { onClick={() => {
@ -132,6 +134,8 @@ function Accounts({ onClose }) {
</MenuLink> </MenuLink>
)} )}
<MenuDivider /> <MenuDivider />
</>
)}
<MenuItem <MenuItem
onClick={() => { onClick={() => {
states.showAccount = `${account.info.username}@${account.instanceURL}`; states.showAccount = `${account.info.username}@${account.instanceURL}`;