adjust emoji statuses and icon names
This commit is contained in:
parent
b007c68aaa
commit
b87ba1f3ea
@ -48,7 +48,28 @@ export default class UserAvatar extends Component {
|
||||
let content = user.name.slice(0, 2);
|
||||
|
||||
if (user.emoji.status !== 'none') {
|
||||
content = <Icon iconName={user.emoji.status}/>;
|
||||
let iconEmoji = undefined;
|
||||
|
||||
switch (user.emoji.status) {
|
||||
case 'thumbsUp':
|
||||
iconEmoji = 'thumbs_up';
|
||||
break;
|
||||
case 'thumbsDown':
|
||||
iconEmoji = 'thumbs_down';
|
||||
break;
|
||||
case 'raiseHand':
|
||||
iconEmoji = 'hand';
|
||||
break;
|
||||
case 'away':
|
||||
iconEmoji = 'time';
|
||||
break;
|
||||
case 'neutral':
|
||||
iconEmoji = 'undecided';
|
||||
break;
|
||||
default:
|
||||
iconEmoji = user.emoji.status;
|
||||
}
|
||||
content = <Icon iconName={iconEmoji}/>;
|
||||
}
|
||||
|
||||
return content;
|
||||
|
@ -1,4 +1,4 @@
|
||||
const EMOJI_STATUSES = ['time', 'hand', 'undecided', 'confused', 'sad',
|
||||
'happy', 'applause', 'thumbs_up', 'thumbs_down'];
|
||||
const EMOJI_STATUSES = ['away', 'raiseHand', 'neutral', 'confused', 'sad',
|
||||
'happy', 'applause', 'thumbsUp', 'thumbsDown'];
|
||||
|
||||
export { EMOJI_STATUSES };
|
||||
|
Loading…
Reference in New Issue
Block a user