The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/sidebar/search/UserItem.js

31 lines
849 B

import { Sidebar } from '@rocket.chat/fuselage';
import React, { memo } from 'react';
import { ReactiveUserStatus } from '../../components/UserStatus';
import { roomCoordinator } from '../../lib/rooms/roomCoordinator';
const UserItem = ({ item, id, style, t, SideBarItemTemplate, AvatarTemplate, useRealName }) => {
const title = useRealName ? item.fname || item.name : item.name || item.fname;
const icon = (
<Sidebar.Item.Icon>
<ReactiveUserStatus uid={item._id} />
</Sidebar.Item.Icon>
);
const href = roomCoordinator.getRouteLink(item.t, item);
return (
<SideBarItemTemplate
is='a'
style={{ height: '100%' }}
id={id}
href={href}
title={title}
subtitle={t('No_messages_yet')}
avatar={AvatarTemplate && <AvatarTemplate {...item} />}
icon={icon}
style={style}
/>
);
};
export default memo(UserItem);