-
-
-
-
- {(userDetails.friendList.find((user: User) => {
- user.username === userDetails.username
- }) !== undefined && (
-
-
-
- )) ||
- (currentUser?.friendRequests.find((user: User) => {
- user.username === userDetails.username
- }) !== undefined && (
-
-
-
- )) ||
- (currentUser?.blockedUsers.find((user: User) => {
- user.username === userDetails.username
- }) === undefined && (
-
-
-
- ))}
-
-
-
-
-
-
-
-
-
-
- {/* Kick user button if we are in chat page and a chat room is selected and the user is the owner of the room
- or the user is an admin, but can't kick out the owner or another admin of the room */}
- {currentRoom &&
- (currentRoom.owner.username === userDetails.username ||
- (currentRoom.admins.find((user: User) => {
- user.username === userDetails.username
- }) !== undefined &&
- currentUser!.username !== currentRoom.owner.username &&
- currentRoom.admins.find((user: User) => {
- user.username === currentUser!.username
- }) === undefined)) && (
-
-
-
- )}
-
-