From c3eb33e230d36b5b2cae610da6ad24714000fe80 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 25 Aug 2024 17:53:24 +0800 Subject: [PATCH] Only show Switch menu items when more than 1 account --- src/pages/accounts.jsx | 46 +++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/src/pages/accounts.jsx b/src/pages/accounts.jsx index 658a49db..2391898b 100644 --- a/src/pages/accounts.jsx +++ b/src/pages/accounts.jsx @@ -110,28 +110,32 @@ function Accounts({ onClose }) { } > - { - setCurrentAccountID(account.info.id); - location.reload(); - }} - > - {' '} - Switch to this account - - {!isStandalone && !isCurrent && ( - - - - Switch in new tab/window - - + {moreThanOneAccount && ( + <> + { + setCurrentAccountID(account.info.id); + location.reload(); + }} + > + {' '} + Switch to this account + + {!isStandalone && !isCurrent && ( + + + + Switch in new tab/window + + + )} + + )} - { states.showAccount = `${account.info.username}@${account.instanceURL}`;