Add pending requests menu.

This commit is contained in:
Paul
2021-07-02 18:00:17 +01:00
parent 32010fdd74
commit 418947c6fa
8 changed files with 107 additions and 16 deletions

View File

@@ -70,7 +70,11 @@ export function Friend({ user }: Props) {
actions.push(
<IconButton type="circle"
className={classNames(styles.button, styles.error)}
onClick={ev => stopPropagation(ev, openScreen({ id: 'special_prompt', type: 'unfriend_user', target: user }))}>
onClick={ev => stopPropagation(ev,
user.relationship === Users.Relationship.Friend ?
openScreen({ id: 'special_prompt', type: 'unfriend_user', target: user })
: client.users.removeFriend(user._id)
)}>
<X size={24} />
</IconButton>
);