Skip to content

Commit

Permalink
[FIX] Regular status mutating custom status (#20613)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored Feb 5, 2021
1 parent 844199b commit df28282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/sidebar/header/UserDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ const UserDropdown = ({ user, onClose }) => {
<Divider mi='neg-x16' mb='x16' borderColor='muted'/>
<div style={style}>
<Box pi='x16' fontScale='c1' textTransform='uppercase'>{t('Status')}</Box>
{Object.keys(userStatus.list).map((key, index) => {
{Object.keys(userStatus.list).map((key) => {
const status = userStatus.list[key];
const name = status.localizeName ? t(status.name) : status.name;
const modifier = status.statusType || user.status;

return <Option onClick={() => { setStatus(status.statusType, name); onClose(); }} key={index}>
return <Option onClick={() => { setStatus(status.statusType, ''); onClose(); }}>
<Option.Column><UserStatus status={modifier}/></Option.Column>
<Option.Content withTruncatedText fontScale='p2'>{name}</Option.Content>
</Option>;
Expand Down

0 comments on commit df28282

Please sign in to comment.