mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 09:06:23 +01:00
Only show 'Set as default' if has more than 1 account
This commit is contained in:
parent
c24a3ef251
commit
d2c820ce5a
1 changed files with 14 additions and 12 deletions
|
@ -105,8 +105,9 @@ function Settings({ onClose }) {
|
|||
</button>
|
||||
}
|
||||
>
|
||||
{moreThanOneAccount && (
|
||||
<MenuItem
|
||||
disabled={isDefault || !moreThanOneAccount}
|
||||
disabled={isDefault}
|
||||
onClick={() => {
|
||||
// Move account to the top of the list
|
||||
accounts.splice(i, 1);
|
||||
|
@ -117,6 +118,7 @@ function Settings({ onClose }) {
|
|||
>
|
||||
Set as default
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem
|
||||
disabled={!isCurrent}
|
||||
onClick={() => {
|
||||
|
|
Loading…
Reference in a new issue