Prevent admin from resetting their own role.

This commit is contained in:
Mike Cao 2024-02-16 10:22:18 -08:00
parent 2e871af05b
commit f25cd93012
10 changed files with 66 additions and 31 deletions

View file

@ -4,6 +4,7 @@
.menu {
background: var(--base50);
min-width: 260px;
}
.heading {

View file

@ -29,7 +29,7 @@ export function TeamsButton({ teamId }: { teamId: string }) {
</Button>
<Popup alignment="end">
{(close: () => void) => (
<Menu variant="popup" onSelect={handleSelect.bind(null, close)}>
<Menu className={styles.menu} variant="popup" onSelect={handleSelect.bind(null, close)}>
<div className={styles.heading}>{formatMessage(labels.myAccount)}</div>
<Item key={user.id} className={classNames({ [styles.selected]: !teamId })}>
<Flexbox gap={10} alignItems="center">