fix: hide actions when favorited

This commit is contained in:
cha0s 2020-07-25 10:03:30 -05:00
parent 901693ef16
commit 414793f5eb

View File

@ -53,12 +53,12 @@ export default function ChatRightUsers() {
if (!isAnonymous && !isSelf) {
if (hasFriendship) {
if ('active' === friendship[index].status) {
userActions.push({
icon: '🚫',
label: 'Unfriend',
onClick: () => dispatch(submitRemoveFriend(id)),
});
if (-1 === favoriteUsers.indexOf(username)) {
userActions.push({
icon: '🚫',
label: 'Unfriend',
onClick: () => dispatch(submitRemoveFriend(id)),
});
userActions.push({
icon: '❤️',
label: 'Favorite',
@ -105,7 +105,7 @@ export default function ChatRightUsers() {
onClick: () => dispatch(submitUnblock(id)),
});
}
else {
else if (-1 === favoriteUsers.indexOf(username)) {
userActions.push({
icon: '☢️',
label: 'Block',