Only show 'Set as default' if has more than 1 account

This commit is contained in:
Lim Chee Aun 2023-01-25 16:42:01 +08:00
parent c24a3ef251
commit d2c820ce5a

View file

@ -105,8 +105,9 @@ function Settings({ onClose }) {
</button> </button>
} }
> >
{moreThanOneAccount && (
<MenuItem <MenuItem
disabled={isDefault || !moreThanOneAccount} disabled={isDefault}
onClick={() => { onClick={() => {
// Move account to the top of the list // Move account to the top of the list
accounts.splice(i, 1); accounts.splice(i, 1);
@ -117,6 +118,7 @@ function Settings({ onClose }) {
> >
Set as default Set as default
</MenuItem> </MenuItem>
)}
<MenuItem <MenuItem
disabled={!isCurrent} disabled={!isCurrent}
onClick={() => { onClick={() => {