parent
05aa6c1dfb
commit
793977203b
|
@ -34,6 +34,9 @@ export const RoomName = ({ room, children, maxLength }: IProps): JSX.Element =>
|
|||
const { isTokenGatedRoom, isCommunityRoom } = useVerifiedRoom(room);
|
||||
|
||||
const roomUsers: string[] = useMemo(() => {
|
||||
if ((room as Room).getJoinedMemberCount?.() > 2 || (room as IPublicRoomsChunkRoom).num_joined_members > 2) {
|
||||
return [];
|
||||
}
|
||||
return (
|
||||
(room as Room)
|
||||
?.getMembers?.()
|
||||
|
@ -55,7 +58,9 @@ export const RoomName = ({ room, children, maxLength }: IProps): JSX.Element =>
|
|||
{isCommunityRoom && <CommunityRoomIcon className="sh_RoomTokenGatedRoomIcon" />}
|
||||
{isTokenGatedRoom && <TokenGatedRoomIcon className="sh_RoomTokenGatedRoomIcon" />}
|
||||
<span dir="auto">{truncatedRoomName}</span>
|
||||
{roomUsers?.length && <UserVerifiedBadge userId={roomUsers[0]} />}
|
||||
{roomUsers?.length && !isTokenGatedRoom && !isCommunityRoom && (
|
||||
<UserVerifiedBadge userId={roomUsers[0]} />
|
||||
)}
|
||||
</span>
|
||||
),
|
||||
[truncatedRoomName, isCommunityRoom, isTokenGatedRoom, roomUsers],
|
||||
|
|
Loading…
Reference in New Issue