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/apps/meteor/client/components/message/header/MessageRoles.tsx

23 lines
614 B

import { MessageRole, MessageRoles as FuselageMessageRoles } from '@rocket.chat/fuselage';
import type { ReactElement } from 'react';
import { useTranslation } from 'react-i18next';
type MessageRolesProps = {
roles: Array<string>;
isBot?: boolean;
};
const MessageRoles = ({ roles, isBot }: MessageRolesProps): ReactElement | null => {
const { t } = useTranslation();
return (
<FuselageMessageRoles>
{roles.map((role, index) => (
<MessageRole key={index}>{role}</MessageRole>
))}
{isBot && <MessageRole>{t('Bot')}</MessageRole>}
</FuselageMessageRoles>
);
};
export default MessageRoles;