adjust emoji statuses and icon names

This commit is contained in:
Anton Georgiev 2017-04-06 10:42:01 -04:00
parent b007c68aaa
commit b87ba1f3ea
2 changed files with 24 additions and 3 deletions

View File

@ -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;

View File

@ -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 };